pkgsrc/x11/ruby-fox/patches/patch-ab

23 lines
674 B
Text

$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{