Permalink
Browse files

little change for setting context, still not perfect

  • Loading branch information...
1 parent 81f8d14 commit d8db8678e83319c809029ff43f8d20547d419fc5 @FROGGS FROGGS committed Mar 10, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Mixer/Channels.xs
View
@@ -6,10 +6,6 @@
#include "defines.h"
#include "helper.h"
-#ifndef aTHX_
-#define aTHX_
-#endif
-
#include <SDL.h>
#ifdef HAVE_SDL_MIXER
@@ -28,7 +24,11 @@ static SV * cb = (SV*)NULL;
void callback(int channel)
{
- PERL_SET_CONTEXT(parent_perl);
+ dTHX;
+ if(!aTHX) {
+ PERL_SET_CONTEXT(parent_perl);
+ }
+
dSP;
ENTER;
SAVETMPS;

0 comments on commit d8db867

Please sign in to comment.