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 1
1
#include <stdlib.h>
2
2
3
3
#include "ruby.h"
4
+ #include "ruby/version.h"
4
5
5
6
// ========= Private Ruby API =========
6
7
// 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) {
323
324
return (uint32_t )DATA_PTR (obj );
324
325
}
325
326
327
+ _Static_assert (RUBY_API_VERSION_MAJOR == 3 , "unsupported Ruby version" );
328
+ #if RUBY_API_VERSION_MINOR == 2
326
329
void rb_vm_bugreport (const void * );
327
330
328
331
void 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
329
339
330
340
bool rb_abi_guest_rb_gc_enable (void ) { return rb_gc_enable () == Qtrue ; }
331
341
You can’t perform that action at this time.
0 commit comments