Skip to content

Commit

Permalink
Update cython to 3.0.10 and silent some const pointer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed May 9, 2024
1 parent a1a7e3d commit e829cda
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 290 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
0.4.29
======

- [NEW]: Upgrade to Cython 3.0.9
- [NEW]: Upgrade to Cython 3.0.10

- [FIX]: Make TA_INCLUDE_PATH and TA_LIBRARY_PATH override default search list

- [FIX]: Silent some compiler warnings about const pointers

0.4.28
======

Expand Down
12 changes: 6 additions & 6 deletions talib/_abstract.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def _ta_getFuncInfo(char *function_name):
Returns the info dict for the function. It has the following keys: name,
group, help, flags, num_inputs, num_opt_inputs and num_outputs.
"""
cdef lib.TA_FuncInfo *info
cdef const lib.TA_FuncInfo *info
retCode = lib.TA_GetFuncInfo(__ta_getFuncHandle(function_name), &info)
_ta_check_success('TA_GetFuncInfo', retCode)

Expand All @@ -652,7 +652,7 @@ def _ta_getInputParameterInfo(char *function_name, int idx):
Returns the function's input info dict for the given index. It has two
keys: name and flags.
"""
cdef lib.TA_InputParameterInfo *info
cdef const lib.TA_InputParameterInfo *info
retCode = lib.TA_GetInputParameterInfo(__ta_getFuncHandle(function_name), idx, &info)
_ta_check_success('TA_GetInputParameterInfo', retCode)

Expand All @@ -673,7 +673,7 @@ def _ta_getOptInputParameterInfo(char *function_name, int idx):
Returns the function's opt_input info dict for the given index. It has the
following keys: name, display_name, type, help, default_value and value.
"""
cdef lib.TA_OptInputParameterInfo *info
cdef const lib.TA_OptInputParameterInfo *info
retCode = lib.TA_GetOptInputParameterInfo(__ta_getFuncHandle(function_name), idx, &info)
_ta_check_success('TA_GetOptInputParameterInfo', retCode)

Expand All @@ -697,7 +697,7 @@ def _ta_getOutputParameterInfo(char *function_name, int idx):
Returns the function's output info dict for the given index. It has two
keys: name and flags.
"""
cdef lib.TA_OutputParameterInfo *info
cdef const lib.TA_OutputParameterInfo *info
retCode = lib.TA_GetOutputParameterInfo(__ta_getFuncHandle(function_name), idx, &info)
_ta_check_success('TA_GetOutputParameterInfo', retCode)

Expand Down Expand Up @@ -764,11 +764,11 @@ def _get_defaults_and_docs(func_info):
# - Getting TALIB handle and paramholder pointers
# - Setting TALIB paramholder optInput values and calling the lookback function

cdef lib.TA_FuncHandle* __ta_getFuncHandle(char *function_name):
cdef const lib.TA_FuncHandle* __ta_getFuncHandle(char *function_name):
"""
Returns a pointer to a function handle for the given function name
"""
cdef lib.TA_FuncHandle *handle
cdef const lib.TA_FuncHandle *handle
_ta_check_success('TA_GetFuncHandle', lib.TA_GetFuncHandle(function_name, &handle))
return handle

Expand Down

0 comments on commit e829cda

Please sign in to comment.