TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.46k stars 1.74k forks source link

Support ta_func.h with TA_LIB_API declarations #537

Closed trufanov-nok closed 2 years ago

trufanov-nok commented 2 years ago

If one build the C lib from sources (sourceforge trunk) and install it - the ta_func.h header in /usr/local/include/ will contain function declarations like:

TA_LIB_API TA_RetCode TA_ACOS( int    startIdx, ...
....
TA_LIB_API TA_RetCode TA_S_ACOS( int    startIdx, ...
...
TA_LIB_API int TA_ACOS_Lookback( void );

while generate_*.py scripts are likely expecting declarations without TA_LIB_API prefix like inside http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz and unable to parse the header from trunk. Which makes addition of a new indicator even more complicated.
This simple patch should make scripts compatible with both headers.

mrjbq7 commented 2 years ago

Awesome, thanks!