From 0f8a140dece086fc76745d3f7f41629eaa61f3df Mon Sep 17 00:00:00 2001 From: Struma Date: Tue, 5 Jul 2022 04:21:03 -0400 Subject: [PATCH] Correct bad GVL ifdefs --- binding/filesystem-binding.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/binding/filesystem-binding.cpp b/binding/filesystem-binding.cpp index 6362165f..a114909d 100644 --- a/binding/filesystem-binding.cpp +++ b/binding/filesystem-binding.cpp @@ -34,7 +34,7 @@ #include "intern.h" #endif -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 #include #endif @@ -74,7 +74,7 @@ static VALUE fileIntForPath(const char *path, bool rubyExc) { return obj; } -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 typedef struct { SDL_RWops *ops; void *dst; @@ -114,13 +114,13 @@ RB_METHOD(fileIntRead) { -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 fileIntReadCbArgs cbargs {ops, RSTRING_PTR(data), length}; rb_thread_call_without_gvl([](void* args) -> void* { call_RWread_cb((fileIntReadCbArgs*)args); return 0; }, (void*)&cbargs, 0, 0); -#elif +#else SDL_RWread(ops, RSTRING_PTR(data), 1, length); #endif