Skip to content

Commit

Permalink
Porperly wrap LLVM::Context
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Mar 8, 2011
1 parent fdafd70 commit 52141fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/parrot/library/LLVM/Context.pm
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
class LLVM::Context is LLVM::Opaque {
multi method create() {
self.wrap(LLVM::call("ContextCreate", ));
LLVM::Context.new.wrap(LLVM::call("ContextCreate"));
}

multi method create($ptr) { self.wrap($ptr) };

method DESTROY() {
LLVM::call("ContextDispose", self);
}

sub global() {
LLVM::Context.create(LLVM::call("GetGlobalContext", ));
LLVM::Context.new.wrap(LLVM::call("GetGlobalContext"));
}

method int1() { LLVM::call("Int1TypeInContext", self) }
Expand Down

0 comments on commit 52141fd

Please sign in to comment.