Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created August 22, 2009 18:20
Show Gist options
  • Select an option

  • Save methodmissing/172904 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/172904 to your computer and use it in GitHub Desktop.
static VALUE rb_f_callback( int argc, VALUE *argv )
{
return rb_callback_initialize( argc, argv, rb_callback_new() );
}
static VALUE
rb_obj_callback( VALUE obj, VALUE mid)
{
VALUE args[2];
args[0] = obj;
args[1] = mid;
return rb_f_callback( 2, (VALUE *)args );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment