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_listint2obj(LLVMStructType, LLVMTypeRef, LLVMTypeRef)
|
||||||
_wrap_obj2obj(LLVMCountStructElementTypes, LLVMTypeRef, int)
|
_wrap_obj2obj(LLVMCountStructElementTypes, LLVMTypeRef, int)
|
||||||
|
|
||||||
|
/*
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_wLLVMGetStructElementTypes(PyObject *self, PyObject *args)
|
_wLLVMGetStructElementTypes(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
return obj2arr(self, args, LLVMCountStructElementTypes, LLVMGetStructElementTypes);
|
return obj2arr(self, args, LLVMCountStructElementTypes, LLVMGetStructElementTypes);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
_wrap_obj2obj(LLVMIsPackedStruct, LLVMTypeRef, int)
|
_wrap_obj2obj(LLVMIsPackedStruct, LLVMTypeRef, int)
|
||||||
|
|
||||||
|
|
@ -1363,7 +1365,7 @@ static PyMethodDef core_methods[] = {
|
||||||
/* Struct types */
|
/* Struct types */
|
||||||
_method( LLVMStructType )
|
_method( LLVMStructType )
|
||||||
_method( LLVMCountStructElementTypes )
|
_method( LLVMCountStructElementTypes )
|
||||||
_method( LLVMGetStructElementTypes )
|
//_method( LLVMGetStructElementTypes )
|
||||||
_method( LLVMIsPackedStruct )
|
_method( LLVMIsPackedStruct )
|
||||||
|
|
||||||
/* Array types */
|
/* Array types */
|
||||||
|
|
|
||||||
12
llvm/core.py
12
llvm/core.py
|
|
@ -709,12 +709,12 @@ class StructType(Type):
|
||||||
Same as len(obj.elements), but faster."""
|
Same as len(obj.elements), but faster."""
|
||||||
return _core.LLVMCountStructElementTypes(self.ptr)
|
return _core.LLVMCountStructElementTypes(self.ptr)
|
||||||
|
|
||||||
@property
|
#@property
|
||||||
def elements(self):
|
#def elements(self):
|
||||||
"""An iterable that yieldsd Type objects, representing the types of the
|
# """An iterable that yieldsd Type objects, representing the types of the
|
||||||
elements (members) of the structure, in order."""
|
# elements (members) of the structure, in order."""
|
||||||
pp = _core.LLVMGetStructElementTypes(self.ptr)
|
# pp = _core.LLVMGetStructElementTypes(self.ptr)
|
||||||
return [ _make_type(p, _core.LLVMGetTypeKind(p)) for p in pp ]
|
# return [ _make_type(p, _core.LLVMGetTypeKind(p)) for p in pp ]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def packed(self):
|
def packed(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue