More changes to get working on LLVM 3.0
This commit is contained in:
parent
3120dbf29e
commit
b4f51acd64
2 changed files with 9 additions and 7 deletions
|
|
@ -297,11 +297,13 @@ _wLLVMGetFunctionTypeParams(PyObject *self, PyObject *args)
|
|||
_wrap_listint2obj(LLVMStructType, LLVMTypeRef, LLVMTypeRef)
|
||||
_wrap_obj2obj(LLVMCountStructElementTypes, LLVMTypeRef, int)
|
||||
|
||||
/*
|
||||
static PyObject *
|
||||
_wLLVMGetStructElementTypes(PyObject *self, PyObject *args)
|
||||
{
|
||||
return obj2arr(self, args, LLVMCountStructElementTypes, LLVMGetStructElementTypes);
|
||||
}
|
||||
*/
|
||||
|
||||
_wrap_obj2obj(LLVMIsPackedStruct, LLVMTypeRef, int)
|
||||
|
||||
|
|
@ -1363,7 +1365,7 @@ static PyMethodDef core_methods[] = {
|
|||
/* Struct types */
|
||||
_method( LLVMStructType )
|
||||
_method( LLVMCountStructElementTypes )
|
||||
_method( LLVMGetStructElementTypes )
|
||||
//_method( LLVMGetStructElementTypes )
|
||||
_method( LLVMIsPackedStruct )
|
||||
|
||||
/* Array types */
|
||||
|
|
|
|||
12
llvm/core.py
12
llvm/core.py
|
|
@ -709,12 +709,12 @@ class StructType(Type):
|
|||
Same as len(obj.elements), but faster."""
|
||||
return _core.LLVMCountStructElementTypes(self.ptr)
|
||||
|
||||
@property
|
||||
def elements(self):
|
||||
"""An iterable that yieldsd Type objects, representing the types of the
|
||||
elements (members) of the structure, in order."""
|
||||
pp = _core.LLVMGetStructElementTypes(self.ptr)
|
||||
return [ _make_type(p, _core.LLVMGetTypeKind(p)) for p in pp ]
|
||||
#@property
|
||||
#def elements(self):
|
||||
# """An iterable that yieldsd Type objects, representing the types of the
|
||||
# elements (members) of the structure, in order."""
|
||||
# pp = _core.LLVMGetStructElementTypes(self.ptr)
|
||||
# return [ _make_type(p, _core.LLVMGetTypeKind(p)) for p in pp ]
|
||||
|
||||
@property
|
||||
def packed(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue