From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A99772095B for ; Wed, 22 Mar 2017 01:41:41 +0000 (UTC) From: Eric Wong To: sleepy-penguin@bogomips.org Subject: [PATCH] sp_copy: remove dummy 1.8 code for non-native threaded Ruby Date: Wed, 22 Mar 2017 01:41:41 +0000 Message-Id: <20170322014141.18763-1-e@80x24.org> List-Id: We don't even support 1.9 in the upcoming release, due to the use of keyword args. --- ext/sleepy_penguin/sp_copy.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/ext/sleepy_penguin/sp_copy.h b/ext/sleepy_penguin/sp_copy.h index 83b9554..008d985 100644 --- a/ext/sleepy_penguin/sp_copy.h +++ b/ext/sleepy_penguin/sp_copy.h @@ -18,24 +18,7 @@ typedef VALUE (*my_blocking_fn_t)(void*); rb_thread_blocking_region((my_blocking_fn_t)(fn),(a),(ubf),(b)) #else /* Ruby 1.8 */ -/* partial emulation of the 1.9 rb_thread_blocking_region under 1.8 */ -# include -# define RUBY_UBF_IO ((rb_unblock_function_t *)-1) -typedef void rb_unblock_function_t(void *); -typedef void * rb_blocking_function_t(void *); -static void * WITHOUT_GVL(rb_blocking_function_t *func, void *data1, - rb_unblock_function_t *ubf, void *data2) -{ - void *rv; - - assert(RUBY_UBF_IO == ubf && "RUBY_UBF_IO required for emulation"); - - TRAP_BEG; - rv = func(data1); - TRAP_END; - - return rv; -} +# error Ruby 1.8 not supported #endif /* ! HAVE_RB_THREAD_BLOCKING_REGION */ #define IO_RUN(fn,data) WITHOUT_GVL((fn),(data),RUBY_UBF_IO,0) -- EW