4 // Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
6 // ------------------------------------------------------------------------------
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 // ------------------------------------------------------------------------------
24 // Please feel free to send questions, suggestions or improvements to:
30 #ifndef SDL_PERL_DEFINES_H
31 #define SDL_PERL_DEFINES_H
33 #ifdef HAVE_TLS_CONTEXT
34 PerlInterpreter *parent_perl = NULL;
35 extern PerlInterpreter *parent_perl;
36 #define GET_TLS_CONTEXT parent_perl = PERL_GET_CONTEXT;
37 #define ENTER_TLS_CONTEXT \
38 PerlInterpreter *current_perl = PERL_GET_CONTEXT; \
39 PERL_SET_CONTEXT(parent_perl); { \
40 PerlInterpreter *my_perl = parent_perl;
41 #define LEAVE_TLS_CONTEXT \
42 } PERL_SET_CONTEXT(current_perl);
44 #define GET_TLS_CONTEXT /* TLS context not enabled */
45 #define ENTER_TLS_CONTEXT /* TLS context not enabled */
46 #define LEAVE_TLS_CONTEXT /* TLS context not enabled */