MetaData operands can be None. Handle this.
This commit is contained in:
parent
53d782bd39
commit
c94e852c0e
3 changed files with 16 additions and 4 deletions
|
|
@ -62,6 +62,11 @@ def unpack_gen(objlist, check_fn):
|
|||
for obj in objlist: check_fn(obj)
|
||||
return [ obj.ptr for obj in objlist ]
|
||||
|
||||
def unpack_gen_allow_none(objlist, check_fn):
|
||||
for obj in objlist:
|
||||
if obj is not None:
|
||||
check_fn(obj)
|
||||
return [ (obj.ptr if obj is not None else None) for obj in objlist ]
|
||||
|
||||
#===----------------------------------------------------------------------===
|
||||
# Helper to wrap over iterables (LLVMFirstXXX, LLVMNextXXX). This used
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue