Java Code Examples for org.bridj.Pointer#getPointer()
The following examples show how to use
org.bridj.Pointer#getPointer() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Module.java From llvm-j with MIT License | 5 votes |
/** * Verifies that a module is valid, throwing an exception if not. */ public void verify() throws LLVMException { Pointer<Pointer<Byte>> ppByte = Pointer.pointerToCStrings(""); int retval = LLVMVerifyModule(module, LLVMVerifierFailureAction.LLVMReturnStatusAction, ppByte); if (retval != 0) { Pointer<Byte> pByte = ppByte.getPointer(Byte.class); final String message = pByte.getCString(); LLVMDisposeMessage(pByte); throw new LLVMException(message); } }
Example 2
Source File: ExecutionEngine.java From llvm-j with MIT License | 5 votes |
public void createJITCompilerForModule(Module m, int optLevel) throws LLVMException { Pointer<Pointer<Byte>> ppByte = Pointer.pointerToCStrings(""); Pointer<LLVMExecutionEngineRef> pExec = Pointer.allocate(LLVMExecutionEngineRef.class); pExec.set(engine); int retval = LLVMCreateJITCompilerForModule(pExec, m.module(), optLevel, ppByte); if (retval != 0) { Pointer<Byte> pByte = ppByte.getPointer(Byte.class); final String message = pByte.getCString(); LLVMDisposeMessage(pByte); throw new LLVMException(message); } }