From e33f49bb3323900b91e50d6149f4b46875a9f4a1 Mon Sep 17 00:00:00 2001
From: Brian Fraser <fraserbn@gmail.com>
Date: Sun, 17 Aug 2014 12:10:28 +0200
Subject: [PATCH] Fix an assertion failure in debugging builds
---
Casing.xs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Casing.xs b/Casing.xs
index ed9174b..f7df895 100644
--- a/Casing.xs
+++ b/Casing.xs
@@ -50,7 +50,13 @@ execute_call_back (pTHX_ OP *op, void *user_data) {
FREETMPS;
LEAVE;
-
+
+ /* S_fold_constant expects us to return either a
+ * temp (from the pad or otherwise) or an immortal,
+ * and fails an assertion if we don't. So mark this
+ * as a temp.
+ */
+ SvTEMP_on(result);
XPUSHs(result);
RETURN;
--
1.7.12.4 (Apple Git-37)