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 2014/06/24 12:53:33 UTC
[1/2] git commit: Fix a double-free in CFCPerlClass
Repository: lucy-clownfish
Updated Branches:
refs/heads/master 501820b22 -> 5fc451355
Fix a double-free in CFCPerlClass
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/7091b3d5
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7091b3d5
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7091b3d5
Branch: refs/heads/master
Commit: 7091b3d5a76504121c310d970292e7b951974b3a
Parents: 501820b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 20 17:23:51 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Apr 25 12:49:50 2014 +0200
----------------------------------------------------------------------
compiler/src/CFCPerlClass.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7091b3d5/compiler/src/CFCPerlClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlClass.c b/compiler/src/CFCPerlClass.c
index ca44a3b..5349d5c 100644
--- a/compiler/src/CFCPerlClass.c
+++ b/compiler/src/CFCPerlClass.c
@@ -75,7 +75,8 @@ CFCPerlClass_init(CFCPerlClass *self, CFCParcel *parcel,
self->parcel = (CFCParcel*)CFCBase_incref((CFCBase*)parcel);
self->class_name = CFCUtil_strdup(class_name);
// Client may be NULL, since fetch_singleton() does not always succeed.
- self->client = CFCClass_fetch_singleton(parcel, class_name);
+ CFCClass *client = CFCClass_fetch_singleton(parcel, class_name);
+ self->client = (CFCClass*)CFCBase_incref((CFCBase*)client);
self->pod_spec = NULL;
self->xs_code = NULL;
self->cons_aliases = NULL;
[2/2] git commit: Fix Clownfish::CFC::Model::ParamList constructor
Posted by nw...@apache.org.
Fix Clownfish::CFC::Model::ParamList constructor
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5fc45135
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5fc45135
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5fc45135
Branch: refs/heads/master
Commit: 5fc451355a4d525868d6721909b3b401ebfa9583
Parents: 7091b3d
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 20 17:29:06 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Apr 25 12:52:51 2014 +0200
----------------------------------------------------------------------
compiler/perl/lib/Clownfish/CFC.xs | 2 +-
compiler/perl/t/301-param_list.t | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5fc45135/compiler/perl/lib/Clownfish/CFC.xs
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC.xs b/compiler/perl/lib/Clownfish/CFC.xs
index bc9ee4c..f093f49 100644
--- a/compiler/perl/lib/Clownfish/CFC.xs
+++ b/compiler/perl/lib/Clownfish/CFC.xs
@@ -973,7 +973,7 @@ PPCODE:
MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Model::ParamList
SV*
-_new(klass, variadic)
+_new(variadic)
int variadic;
CODE:
CFCParamList *self = CFCParamList_new(variadic);
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5fc45135/compiler/perl/t/301-param_list.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/301-param_list.t b/compiler/perl/t/301-param_list.t
index b3665c8..085f09e 100644
--- a/compiler/perl/t/301-param_list.t
+++ b/compiler/perl/t/301-param_list.t
@@ -16,10 +16,12 @@
use strict;
use warnings;
-use Test::More tests => 13;
+use Test::More tests => 14;
BEGIN { use_ok('Clownfish::CFC::Model::ParamList') }
+ok( Clownfish::CFC::Model::ParamList->new, 'new' );
+
my $parser = Clownfish::CFC::Parser->new;
$parser->parse('parcel Neato;')
or die "failed to process parcel_definition";