summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole_event.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 8e30732..577333b 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -6,6 +6,8 @@
* <code>WIN32OLE_EVENT</code> objects controls OLE event.
*/
+RUBY_EXTERN void rb_write_error_str(VALUE mesg);
+
typedef struct {
struct IEventSinkVtbl * lpVtbl;
} IEventSink, *PEVENTSINK;
@@ -468,7 +470,7 @@ rescue_callback(VALUE arg)
VALUE msg = rb_funcall(e, rb_intern("message"), 0);
bt = rb_ary_entry(bt, 0);
error = rb_sprintf("%"PRIsVALUE": %"PRIsVALUE" (%s)\n", bt, msg, rb_obj_classname(e));
- rb_write_error(StringValuePtr(error));
+ rb_write_error_str(error);
rb_backtrace();
ruby_finalize();
exit(-1);