From: Tony Cook <tony@develop-help.com>
Date: Mon, 13 Aug 2012 09:02:17 +0000 (+1000)
Subject: fix C89 and non-threaded builds
X-Git-Tag: v0.93_02~47
X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/39512eadfecf8b79ff1cde8b785c972e12f401b2

fix C89 and non-threaded builds
---

diff --git a/Imager.xs b/Imager.xs
index 2c3695f2..e9e63519 100644
--- a/Imager.xs
+++ b/Imager.xs
@@ -4066,8 +4066,8 @@ im_context_DESTROY(ctx)
 void
 im_context_CLONE(...)
     CODE:
-      (void)items;
       MY_CXT_CLONE;
+      (void)items;
       /* the following sv_setref_pv() will free this inc */
       im_context_refinc(MY_CXT.ctx, "CLONE");
       MY_CXT.ctx = im_context_clone(MY_CXT.ctx, "CLONE");
@@ -4078,9 +4078,11 @@ im_context_CLONE(...)
 BOOT:
         PERL_SET_GLOBAL_CALLBACKS;
 	PERL_PL_SET_GLOBAL_CALLBACKS;
+#ifdef PERL_IMPLICIT_CONTEXT
 	{
           MY_CXT_INIT;
 	  (void)MY_CXT;
 	}
+#endif
 	start_context(aTHX);
 	im_get_context = perl_get_context;