Follow up on pull request 21. Since PyCapsule_GetPointer returns NULL on error, we should check if the list element is Py_None.
This commit is contained in:
parent
f9efc23e2d
commit
56796cad61
2 changed files with 11 additions and 1 deletions
|
|
@ -1456,6 +1456,9 @@ class Function(GlobalValue):
|
|||
class MetaData(Value):
|
||||
@staticmethod
|
||||
def get(module, values):
|
||||
'''
|
||||
values -- must be an iterable of Constant or None. None is treated as "null".
|
||||
'''
|
||||
vs = unpack_values_or_none(values)
|
||||
ptr = _core.LLVMMetaDataGet(module.ptr, vs)
|
||||
return MetaData(ptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue