public unsafe ExecutionResult *CreateExecutionResult(bool failed, type_primitive_id type, object value) { ExecutionResult *er = CreateExecutionResult(failed, type); er->ptr = MetacallDef.GetIntPtr(type, value); return(er); }
public unsafe ExecutionResult *CreateExecutionResult(bool failed, type_primitive_id type) { ExecutionResult *er = (ExecutionResult *)Marshal.AllocHGlobal(sizeof(ExecutionResult)); er->failed = failed; er->type = type; er->ptr = IntPtr.Zero; return(er); }
public unsafe static void DestroyExecutionResult(ExecutionResult *executionResult) { if (executionResult->ptr != IntPtr.Zero) { Marshal.FreeHGlobal(executionResult->ptr); } Marshal.FreeHGlobal((IntPtr)executionResult); }