summaryrefslogtreecommitdiff
path: root/ext/ffi_c/MethodHandle.c
diff options
context:
space:
mode:
authorCharlie Savage <cfis@zerista.com>2011-08-17 23:56:22 -0600
committerCharlie Savage <cfis@zerista.com>2011-08-17 23:56:22 -0600
commita2763086cb6d02f8e130fb050a9e7ae8efe7eb52 (patch)
tree3770a886982805b048fcb27e553f25658639107e /ext/ffi_c/MethodHandle.c
parent365a162a5e1fda91a3d55dd1ad663051e50bb89e (diff)
downloadffi-a2763086cb6d02f8e130fb050a9e7ae8efe7eb52.tar.gz
VC++ requires variables to be declared at the start of blocks.
Diffstat (limited to 'ext/ffi_c/MethodHandle.c')
-rw-r--r--ext/ffi_c/MethodHandle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/ffi_c/MethodHandle.c b/ext/ffi_c/MethodHandle.c
index ef82347..6e96c48 100644
--- a/ext/ffi_c/MethodHandle.c
+++ b/ext/ffi_c/MethodHandle.c
@@ -150,7 +150,7 @@ trampoline_size(void)
}
/*
- * attached_method_vinvoke is used functions with more than 6 parameters, or
+ * attached_method_invoke is used functions with more than 6 parameters, or
* with struct param or return values
*/
static void
@@ -316,6 +316,7 @@ trampoline_size(void)
void
rbffi_MethodHandle_Init(VALUE module)
{
+ ffi_status ffiStatus;
defaultClosurePool = rbffi_ClosurePool_New((int) trampoline_size(), prep_trampoline, NULL);
#if defined(CUSTOM_TRAMPOLINE)
@@ -323,7 +324,7 @@ rbffi_MethodHandle_Init(VALUE module)
rb_raise(rb_eFatal, "Could not locate offsets in trampoline code");
}
#else
- ffi_status ffiStatus = ffi_prep_cif(&mh_cif, FFI_DEFAULT_ABI, 3, &ffi_type_ulong,
+ ffiStatus = ffi_prep_cif(&mh_cif, FFI_DEFAULT_ABI, 3, &ffi_type_ulong,
methodHandleParamTypes);
if (ffiStatus != FFI_OK) {
rb_raise(rb_eFatal, "ffi_prep_cif failed. status=%#x", ffiStatus);