KOSAKI Motohiro <kosaki.motohiro / gmail.com> wrote:
> On Tue, Oct 20, 2015 at 6:28 PM,  <normalperson / yhbt.net> wrote:
> > Issue #11607 has been updated by Eric Wong.
> >
> > File fiddle-release-GVL-for-ffi_call-v2.patch added
> >
> > v2 fixes a warning I did not notice before, interdiff:
> > ~~~
> > --- a/ext/fiddle/closure.c
> > +++ b/ext/fiddle/closure.c
> > @@ -64,7 +64,7 @@ struct callback_args {
> >      void *ctx;
> >  };
> >
> > -static void
> > +static void *
> >  with_gvl_callback(void *ptr)
> >  {
> >      struct callback_args *x = ptr;
> > @@ -177,6 +177,7 @@ with_gvl_callback(void *ptr)
> >        default:
> >         rb_raise(rb_eRuntimeError, "closure retval: %d", type);
> >      }
> > +    return 0;
> 
> This interdiff is really ugly to me. Do we really have no other way?

I'm not sure what you mean.  I made the change to match the signature of
rb_thread_call_with_gvl, and I think rb_thread_call_with_gvl is a
reasonable API.

I could do s/0/NULL/ if that's what you mean.  I don't have a strong
opinion on '0' vs 'NULL', and Ruby source seems to use both.