lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [3/4] git commit: Call yylex_destroy at the end of CFCParser_parse
Date Sat, 22 Mar 2014 14:46:20 GMT
Call yylex_destroy at the end of CFCParser_parse

This releases allocated memory and should reset globals like 'lineno'
in subsequent invocations.


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

Branch: refs/heads/master
Commit: 6a7b05b282bf1602d476daa482139ae522c6991d
Parents: 2ff4d25
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Mar 22 15:09:13 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Mar 22 15:09:13 2014 +0100

----------------------------------------------------------------------
 compiler/c/cfc.c         | 1 -
 compiler/c/t/test_cfc.c  | 1 -
 compiler/src/CFCParser.c | 2 ++
 3 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6a7b05b2/compiler/c/cfc.c
----------------------------------------------------------------------
diff --git a/compiler/c/cfc.c b/compiler/c/cfc.c
index b467ce9..df5e9bd 100644
--- a/compiler/c/cfc.c
+++ b/compiler/c/cfc.c
@@ -241,7 +241,6 @@ main(int argc, char **argv) {
 
     CFCClass_clear_registry();
     CFCParcel_reap_singletons();
-    yylex_destroy();
 
     S_free_arguments(&args);
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6a7b05b2/compiler/c/t/test_cfc.c
----------------------------------------------------------------------
diff --git a/compiler/c/t/test_cfc.c b/compiler/c/t/test_cfc.c
index f8da717..21a9850 100644
--- a/compiler/c/t/test_cfc.c
+++ b/compiler/c/t/test_cfc.c
@@ -26,7 +26,6 @@ main() {
     CFCTest_run_all(test);
     int pass = CFCTest_finish(test);
     CFCBase_decref((CFCBase*)test);
-    yylex_destroy();
 
     return pass ? EXIT_SUCCESS : EXIT_FAILURE;
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6a7b05b2/compiler/src/CFCParser.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCParser.c b/compiler/src/CFCParser.c
index 0a16d65..6e93ad7 100644
--- a/compiler/src/CFCParser.c
+++ b/compiler/src/CFCParser.c
@@ -112,6 +112,8 @@ CFCParser_parse(CFCParser *self, const char *string) {
         CFCBase_decref((CFCBase*)result);
         result = NULL;
     }
+
+    yylex_destroy();
     return result;
 }
 


Mime
View raw message