We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e962fa8 commit 767fc92Copy full SHA for 767fc92
src/main/c/cext/ruby.c
@@ -26,6 +26,12 @@
26
#include <fcntl.h>
27
#include <printf.h>
28
29
+/*
30
+ * Note that some functions are #undef'd just before declaration.
31
+ * This is needed because these functions are declared by MRI as macros in e.g., ruby.h,
32
+ * and so would produce invalid syntax when using the function name for definition.
33
+ */
34
+
35
void* rb_tr_cext;
36
37
#ifdef __APPLE__
@@ -1289,7 +1295,6 @@ bool rb_tr_hidden_p(VALUE value) {
1289
1295
return false;
1290
1296
}
1291
1297
1292
-// Undef conflicting macro from encoding.h like MRI
1293
1298
#undef rb_enc_str_new
1294
1299
VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) {
1300
return RUBY_INVOKE(rb_str_new(ptr, len), "force_encoding", rb_enc_from_encoding(enc));
0 commit comments