summaryrefslogtreecommitdiff
path: root/x11/ruby-fox/patches/patch-ab
blob: 7f154314e5b863848ed30311087b09641a213b6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-ab,v 1.1 2002/01/26 03:50:35 taca Exp $

--- FXRuby.cpp.orig	Fri Jul 27 05:09:22 2001
+++ FXRuby.cpp
@@ -74,6 +74,9 @@
 #include <io.h>		// for get_osf_handle()
 #endif
 
+#define RB_BPROC(func) ((VALUE (*)(...))func)
+#define RB_RPROC(func) ((VALUE (*)(...))func)
+
 // Maps C++ objects to Ruby instances
 static std::map<const void*,VALUE> FXRuby_ObjMap;
 
@@ -766,7 +769,7 @@
   hArgs.nargs=3;
   VALUE retval;
   if(FXRbCatchExceptions){
-    retval=rb_rescue2(handle_body,(VALUE)&hArgs,handle_rescue,Qnil,
+    retval=rb_rescue2(RB_BPROC(handle_body),(VALUE)&hArgs,RB_RPROC(handle_rescue),Qnil,
       rb_eStandardError,rb_eNameError,0);
     }
   else{