search for: staticmethod

Displaying 5 results from an estimated 5 matches for "staticmethod".

2012 Dec 10
1
[LLVMdev] install llvm on sparc/solaris
...File "/llvm3.1/llvm-3.1/utils/llvm-build/llvm-build", line 3, in ?     import llvmbuild   File "/llvm3.1/llvm-3.1/utils/llvm-build/llvmbuild/__init__.py", line 1, in ?     from main import main   File "/llvm3.1/llvm-3.1/utils/llvm-build/llvmbuild/main.py", line 65     @staticmethod     ^ SyntaxError: invalid syntax make[1]: Entering directory `/llvm3.1/llvm-3.1/lib/Support' llvm[1]: Constructing LLVMBuild project information. Traceback (most recent call last):   File "/llvm3.1/llvm-3.1/utils/llvm-build/llvm-build", line 3, in ?     import llvmbuild   File "...
2008 May 13
2
[LLVMdev] Python bindings available.
Hm. I may misunderstand, but I'm not sure that's an improvement over the problem you're trying to solve. How about something like this? (Please forgive any accent; I don't speak snake fluently.) class Pet(object): @staticmethod def new(): # Create a 'free' pet. It can later become owned, but not to more than one owner. return Pet(_core.LLVMCreatePet(), None) def __init__(self, ptr, owner): self.ptr = ptr self.owner = owner def __del__(self): # Do not call the dtor if something...
2008 May 13
0
[LLVMdev] Python bindings available.
On Tue, May 13, 2008 at 1:22 PM, Gordon Henriksen <gordonhenriksen at mac.com> wrote: > On 2008-05-13, at 02:12, Mahadevan R wrote: > > >>> That's not how the object works... > > > > Gordon, I think I can make it work if we have the following additional > > function in LLVM-C: > > > > LLVMModuleRef LLVMGetModule(LLVMModuleProviderRef
2008 May 13
2
[LLVMdev] Python bindings available.
On 2008-05-13, at 02:12, Mahadevan R wrote: >>> That's not how the object works... > > Gordon, I think I can make it work if we have the following additional > function in LLVM-C: > > LLVMModuleRef LLVMGetModule(LLVMModuleProviderRef MP) { > return wrap(unwrap(MP)->getModule()); > } Can I ask, how general is your solution? I only intended to use this
2012 Mar 28
0
[LLVMdev] GSoC 2012 Proposal: Python bindings for LLVM
...uot;"" return Function.new(self, ty, name)* This method calls the constructor of class "*Function*" (Function.new). So let’s take a look at what this constructor is? It is also defined in the file *core.py* in llvm-py as the following: *class Function(GlobalValue): @staticmethod def new(module, func_ty, name): check_is_module(module) check_is_type(func_ty) return _make_value(_core.LLVMAddFunction(module.ptr, name, func_ty.ptr))* The most important statement in the above constructor is: *_core.LLVMAddFunction(module.ptr, name, func_ty.pt...