mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-30 18:53:07 +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"
|
#include "intern.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if RAPI_MAJOR > 2
|
#if RAPI_MAJOR >= 2
|
||||||
#include <ruby/thread.h>
|
#include <ruby/thread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ static VALUE fileIntForPath(const char *path, bool rubyExc) {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RAPI_MAJOR > 2
|
#if RAPI_MAJOR >= 2
|
||||||
typedef struct {
|
typedef struct {
|
||||||
SDL_RWops *ops;
|
SDL_RWops *ops;
|
||||||
void *dst;
|
void *dst;
|
||||||
|
@ -114,13 +114,13 @@ RB_METHOD(fileIntRead) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if RAPI_MAJOR > 2
|
#if RAPI_MAJOR >= 2
|
||||||
fileIntReadCbArgs cbargs {ops, RSTRING_PTR(data), length};
|
fileIntReadCbArgs cbargs {ops, RSTRING_PTR(data), length};
|
||||||
rb_thread_call_without_gvl([](void* args) -> void* {
|
rb_thread_call_without_gvl([](void* args) -> void* {
|
||||||
call_RWread_cb((fileIntReadCbArgs*)args);
|
call_RWread_cb((fileIntReadCbArgs*)args);
|
||||||
return 0;
|
return 0;
|
||||||
}, (void*)&cbargs, 0, 0);
|
}, (void*)&cbargs, 0, 0);
|
||||||
#elif
|
#else
|
||||||
SDL_RWread(ops, RSTRING_PTR(data), 1, length);
|
SDL_RWread(ops, RSTRING_PTR(data), 1, length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue