#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 )