Displaying 1 result from an estimated 1 matches for "genericvalue_v".
Did you mean:
genericvalue
2010 Oct 25
0
[LLVMdev] Ocaml bindings for execution engines
...LLVMExecutionEngineRef EE) {
unsigned NumArgs;
LLVMGenericValueRef Result, *GVArgs;
unsigned I;
NumArgs = Wosize_val(Args);
GVArgs = (LLVMGenericValueRef*) malloc(NumArgs * sizeof(LLVMGenericValueRef));
for (I = 0; I != NumArgs; ++I)
GVArgs[I] = Genericvalue_val(Field(Args, I));
Result = LLVMRunFunction(EE, F, NumArgs, GVArgs);
free(GVArgs);
return alloc_generic_value(Result);
}
I noticed that the Args parameter has not been protected by CAMLparam
with CAMLreturn. Is this safe in this case, because we allocated a
GVArgs? The other bindings files...