Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove warnings when run with ruby -w

  • Loading branch information...
commit 973060292566bce8834cf8210717daf9f8c8c3a1 1 parent 9bec34a
Wayne Meissner authored
View
2  ext/ffi_c/Function.c
@@ -263,7 +263,7 @@ function_attach(VALUE self, VALUE module, VALUE name)
snprintf(var, sizeof(var), "@@%s", StringValueCStr(name));
rb_cv_set(module, var, self);
- rb_define_module_function(module, StringValueCStr(name),
+ rb_define_singleton_method(module, StringValueCStr(name),
rbffi_MethodHandle_CodeAddress(fn->methodHandle), -1);
View
2  ext/ffi_c/Type.c
@@ -265,7 +265,7 @@ rbffi_Type_Init(VALUE moduleFFI)
rb_define_method(classType, "initialize", type_initialize, 1);
rb_define_method(classType, "size", type_size, 0);
rb_define_method(classType, "alignment", type_alignment, 0);
- rb_define_method(classBuiltinType, "inspect", type_inspect, 0);
+ rb_define_method(classType, "inspect", type_inspect, 0);
// Make Type::Builtin non-allocatable
rb_undef_method(CLASS_OF(classBuiltinType), "new");
View
5 ext/ffi_c/Variadic.c
@@ -162,7 +162,7 @@ ffi_invoke(ffi_cif* cif, void* function, Type* returnType, void** ffiValues,
}
static VALUE
-variadic_call(VALUE self, VALUE parameterTypes, VALUE parameterValues)
+variadic_invoke(VALUE self, VALUE parameterTypes, VALUE parameterValues)
{
VariadicInvoker* invoker;
FFIStorage* params;
@@ -254,7 +254,6 @@ rbffi_Variadic_Init(VALUE moduleFFI)
rb_define_alloc_func(classVariadicInvoker, variadic_allocate);
rb_define_method(classVariadicInvoker, "initialize", variadic_initialize, 4);
- rb_define_method(classVariadicInvoker, "invoke", variadic_call, 2);
- rb_define_alias(classVariadicInvoker, "call", "invoke");
+ rb_define_method(classVariadicInvoker, "invoke", variadic_invoke, 2);
}
Please sign in to comment.
Something went wrong with that request. Please try again.