X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2FSDL.xs;h=f6660fa80e8d7017d7b4894afb8492ba89fe8924;hb=a10ede21cb16ec8302e351fa3963d623a28f5d1a;hp=657bfadd87893dd37fe96bc566195abd66df36fb;hpb=5c44eb34dedf77aa7c4f679ef5d5bbab24dea8d9;p=sdlgit%2FSDL_perl.git diff --git a/src/SDL.xs b/src/SDL.xs index 657bfad..f6660fa 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -97,7 +97,27 @@ static int sdl_perl_use_smpeg_audio = 0; #define HAVE_TLS_CONTEXT #endif -#include "src/defines.h" +/* For windows */ +#ifndef SDL_PERL_DEFINES_H +#define SDL_PERL_DEFINES_H + +#ifdef HAVE_TLS_CONTEXT +PerlInterpreter *parent_perl = NULL; +extern PerlInterpreter *parent_perl; +#define GET_TLS_CONTEXT parent_perl = PERL_GET_CONTEXT; +#define ENTER_TLS_CONTEXT \ + PerlInterpreter *current_perl = PERL_GET_CONTEXT; \ + PERL_SET_CONTEXT(parent_perl); { \ + PerlInterpreter *my_perl = parent_perl; +#define LEAVE_TLS_CONTEXT \ + } PERL_SET_CONTEXT(current_perl); +#else +#define GET_TLS_CONTEXT /* TLS context not enabled */ +#define ENTER_TLS_CONTEXT /* TLS context not enabled */ +#define LEAVE_TLS_CONTEXT /* TLS context not enabled */ +#endif + +#endif Uint32 sdl_perl_timer_callback ( Uint32 interval, void* param )