From b4f51acd64b750cddeab759884668cdcbdfc315f Mon Sep 17 00:00:00 2001 From: "Travis E. Oliphant" Date: Thu, 9 Feb 2012 23:40:22 -0600 Subject: [PATCH] More changes to get working on LLVM 3.0 --- llvm/_core.c | 4 +++- llvm/core.py | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/llvm/_core.c b/llvm/_core.c index 663a6c3..4a286f2 100644 --- a/llvm/_core.c +++ b/llvm/_core.c @@ -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 */ diff --git a/llvm/core.py b/llvm/core.py index 5201c6e..2f2ec47 100644 --- a/llvm/core.py +++ b/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):