mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-30 10:43:02 +02:00
Correct bad GVL ifdefs
This commit is contained in:
parent
8f018fdb30
commit
0f8a140dec
1 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "intern.h"
|
||||
#endif
|
||||
|
||||
#if RAPI_MAJOR > 2
|
||||
#if RAPI_MAJOR >= 2
|
||||
#include <ruby/thread.h>
|
||||
#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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue