You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although this haven't caused any problems until now, it might lead to hidden hard to debug failures in the future. Few examples from the codebase that need fixing.
LLVMPY_PrintValueToString, LLVMPY_SetValueName, LLVMPY_SetLinkage, etc from ffi/value.cpp
LLVMPY_GetHostCPUName, LLVMPY_GetDefaultTargetTriple, etc from ffi/targets.cpp
Similarly many from passmanagers.cpp, newpassmanagers.cpp, transfroms.cpp
It seems like it's a practice in the codebase to not declare restype for llvm functions returning void.
If this is to be fixed a question I have is what should be the restype for these functions, None or c_int?
The text was updated successfully, but these errors were encountered:
For short term fixing the issue, the best practice is to set restype to None for void returning function.
For long term avoiding the issue, it was suggested in today's numba triage meeting to add a API like how ctypes.CFUNCTYPE(restype, *argtypes) would forces one to insert a restype.
Although this haven't caused any problems until now, it might lead to hidden hard to debug failures in the future. Few examples from the codebase that need fixing.
LLVMPY_PrintValueToString
,LLVMPY_SetValueName
,LLVMPY_SetLinkage
, etc fromffi/value.cpp
LLVMPY_GetHostCPUName
,LLVMPY_GetDefaultTargetTriple
, etc fromffi/targets.cpp
passmanagers.cpp
,newpassmanagers.cpp
,transfroms.cpp
It seems like it's a practice in the codebase to not declare restype for llvm functions returning void.
If this is to be fixed a question I have is what should be the
restype
for these functions,None
orc_int
?The text was updated successfully, but these errors were encountered: