Forum: Ruby ta-lib porting with swig

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7785f254d50e146127c2fed102c63443?d=identicon&s=25 BENI (Guest)
on 2007-03-13 11:55
(Received via mailing list)
I have a function in c from ta-lib (TA-Lib provides common functions
for the technical analysis of financial market data)

 function header

TA_RetCode TA_MA( int          startIdx,
                  int          endIdx,
                  const double inReal[],
                  int          optInTimePeriod,
                  int          optInMAType,
                  int         *outBegIdx,
                  int         *outNbElement,
                  double       outReal[],
In c it is called as

TA_Real    closePrice[400];
TA_Real    out[400];
TA_Integer outBeg;
TA_Integer outNbElement;

/* ... initialize your closing price here... */

retCode = TA_MA( 0, 399,
&outBeg, &outNbElement, &out[0] );

/* The output is displayed here */
for( i=0; i < outNbElement; i++ )
   printf( "Day %d = %f\n", outBeg+i, out[i] );

i was wondering how will the typemap in SWIG  look like for arguments

const double inReal[]
int         *outBegIdx
int         *outNbElement,
  double       outReal[],


can any one help me out by giving some lead?

This topic is locked and can not be replied to.