File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11#include <stdlib.h>
22
33#include "ruby.h"
4+ #include "ruby/version.h"
45
56// ========= Private Ruby API =========
67// from eval_intern.h
@@ -323,9 +324,18 @@ uint32_t rb_abi_guest_rb_abi_value_data_ptr(rb_abi_guest_rb_abi_value_t self) {
323324 return (uint32_t )DATA_PTR (obj );
324325}
325326
327+ _Static_assert (RUBY_API_VERSION_MAJOR == 3 , "unsupported Ruby version" );
328+ #if RUBY_API_VERSION_MINOR == 2
326329void rb_vm_bugreport (const void * );
327330
328331void rb_abi_guest_rb_vm_bugreport (void ) { rb_vm_bugreport (NULL ); }
332+ #elif RUBY_API_VERSION_MINOR == 3
333+ bool rb_vm_bugreport (const void * , FILE * );
334+
335+ void rb_abi_guest_rb_vm_bugreport (void ) { rb_vm_bugreport (NULL , stderr ); }
336+ #else
337+ # error "unsupported Ruby version"
338+ #endif
329339
330340bool rb_abi_guest_rb_gc_enable (void ) { return rb_gc_enable () == Qtrue ; }
331341
You can’t perform that action at this time.
0 commit comments