You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2013/08/12 22:36:49 UTC
[lucy-commits] git commit: refs/heads/method-imp-names - Fix up alias init code in
CFCPerl.
Updated Branches:
refs/heads/method-imp-names e797381d7 -> 21354d405
Fix up alias init code in CFCPerl.
This commit will be folded into an earlier commit addressing unused var
warnings before merging to master.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/21354d40
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/21354d40
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/21354d40
Branch: refs/heads/method-imp-names
Commit: 21354d405999dbf5f93f476afe9fb1f5dd7b98ab
Parents: e797381
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Fri Aug 9 22:29:29 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Mon Aug 12 13:33:25 2013 -0700
----------------------------------------------------------------------
clownfish/compiler/src/CFCPerl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/21354d40/clownfish/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerl.c b/clownfish/compiler/src/CFCPerl.c
index 1547bb7..6dae89a 100644
--- a/clownfish/compiler/src/CFCPerl.c
+++ b/clownfish/compiler/src/CFCPerl.c
@@ -208,6 +208,7 @@ S_write_boot_c(CFCPerl *self) {
char *bootstrap_code = CFCUtil_strdup("");
char *alias_adds = CFCUtil_strdup("");
char *isa_pushes = CFCUtil_strdup("");
+ int has_aliases = 0;
for (size_t i = 0; parcels[i]; ++i) {
if (!CFCParcel_included(parcels[i])) {
@@ -236,13 +237,14 @@ S_write_boot_c(CFCPerl *self) {
const char **aliases
= CFCPerlClass_get_class_aliases(class_binding);
for (size_t j = 0; aliases[j] != NULL; j++) {
- if (!strlen(alias_adds)) {
+ if (!has_aliases) {
// There's at least one alias, so include the buffer.
alias_adds
= CFCUtil_cat(alias_adds,
" cfish_ZombieCharBuf *alias "
"= CFISH_ZCB_WRAP_STR(\"\", 0);\n",
NULL);
+ has_aliases = 1;
}
const char *alias = aliases[j];