From bd075d62fe156843d2c4aab2e70ff5cda54320b4 Mon Sep 17 00:00:00 2001 From: Snowdream Date: Sat, 9 Jul 2022 19:28:23 -0400 Subject: [PATCH] Older versions of Ruby 2 don't have rb_utf8_str_* --- binding/binding-util.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/binding/binding-util.h b/binding/binding-util.h index a441bb61..8f6e35cb 100644 --- a/binding/binding-util.h +++ b/binding/binding-util.h @@ -168,14 +168,15 @@ return Data_Wrap_Struct(klass, 0, free, 0); \ #define DEF_ALLOCFUNC(type) DEF_ALLOCFUNC_CUSTOMFREE(type, freeInstance) -#if RAPI_MINOR < 9 +#define PRIsVALUE "s" + +#endif + +#if RAPI_FULL < 240 #define rb_utf8_str_new_cstr rb_str_new2 #define rb_utf8_str_new rb_str_new #endif -#define PRIsVALUE "s" - -#endif // end #if RAPI_FULL > 187