ext/ffi_c/MethodHandle.c in ffi-1.1.6.pre2 vs ext/ffi_c/MethodHandle.c in ffi-1.2.0.dev

- old
+ new

@@ -309,11 +309,11 @@ prep_trampoline(void* ctx, void* code, Closure* closure, char* errmsg, size_t errmsgsize) { caddr_t ptr = (caddr_t) code; memcpy(ptr, &ffi_trampoline, trampoline_size()); - /* Patch the context and function addresses into the stub code */ + // Patch the context and function addresses into the stub code *(intptr_t *)(ptr + trampoline_ctx_offset) = (intptr_t) closure; *(intptr_t *)(ptr + trampoline_func_offset) = (intptr_t) custom_trampoline; return true; } @@ -328,13 +328,10 @@ void rbffi_MethodHandle_Init(VALUE module) { -#ifndef CUSTOM_TRAMPOLINE ffi_status ffiStatus; -#endif - defaultClosurePool = rbffi_ClosurePool_New((int) trampoline_size(), prep_trampoline, NULL); #if defined(CUSTOM_TRAMPOLINE) if (trampoline_offsets(&trampoline_ctx_offset, &trampoline_func_offset) != 0) { rb_raise(rb_eFatal, "Could not locate offsets in trampoline code");