You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/09/07 16:50:37 UTC

[2/2] lucy-clownfish git commit: Fix croak_sv usage

Fix croak_sv usage

croak_sv is only available since Perl 5.14.

Also switch to FREEMEM to avoid crash under ActivePerl.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/71759cfc
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/71759cfc
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/71759cfc

Branch: refs/heads/master
Commit: 71759cfcef5e10c92f309efbaa5a3cc40c29696e
Parents: 1ba0f7e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Sep 7 18:01:09 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Sep 7 18:43:18 2016 +0200

----------------------------------------------------------------------
 compiler/src/CFCUtil.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/71759cfc/compiler/src/CFCUtil.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCUtil.c b/compiler/src/CFCUtil.c
index 6c0f224..ebd70ff 100644
--- a/compiler/src/CFCUtil.c
+++ b/compiler/src/CFCUtil.c
@@ -713,9 +713,9 @@ CFCUtil_rethrow(char *error) {
         longjmp(*current_env, 1);
     }
     else {
-        SV *error_sv = newSVpv(error, 0);
-        free(error);
-        croak_sv(sv_2mortal(error_sv));
+        sv_setpv(ERRSV, error);
+        FREEMEM(error);
+        croak(NULL);
     }
 }