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 2012/12/16 18:00:22 UTC
[lucy-commits] [1/3] git commit: refs/heads/master - Include headers of all classes
in parcel.c
Updated Branches:
refs/heads/master b2f9eb489 -> bb466e09e
Include headers of all classes in parcel.c
Headers of "included" classes are needed for compiled extensions.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/bb466e09
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/bb466e09
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/bb466e09
Branch: refs/heads/master
Commit: bb466e09e758ab7058a6bf5fa9588670d45f8c00
Parents: 835723e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Dec 16 17:48:50 2012 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Dec 16 17:48:50 2012 +0100
----------------------------------------------------------------------
clownfish/compiler/src/CFCBindCore.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/bb466e09/clownfish/compiler/src/CFCBindCore.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindCore.c b/clownfish/compiler/src/CFCBindCore.c
index b79a5bd..1309822 100644
--- a/clownfish/compiler/src/CFCBindCore.c
+++ b/clownfish/compiler/src/CFCBindCore.c
@@ -267,6 +267,11 @@ S_write_parcel_c(CFCBindCore *self) {
CFCClass **ordered = CFCHierarchy_ordered_classes(hierarchy);
for (int i = 0; ordered[i] != NULL; i++) {
CFCClass *klass = ordered[i];
+
+ const char *include_h = CFCClass_include_h(klass);
+ includes = CFCUtil_cat(includes, "#include \"", include_h,
+ "\"\n", NULL);
+
if (CFCClass_included(klass)) { continue; }
CFCBindClass *class_binding = CFCBindClass_new(klass);
@@ -286,15 +291,10 @@ S_write_parcel_c(CFCBindCore *self) {
const char *privacy_sym = CFCClass_privacy_symbol(klass);
privacy_syms = CFCUtil_cat(privacy_syms, "#define ",
privacy_sym, "\n", NULL);
- const char *include_h = CFCClass_include_h(klass);
- includes = CFCUtil_cat(includes, "#include \"", include_h,
- "\"\n", NULL);
- if (!CFCClass_included(klass)) {
- if (parcel && CFCClass_get_parcel(klass) != parcel) {
- CFCUtil_die("Multiple parcels not yet supported.");
- }
- parcel = CFCClass_get_parcel(klass);
+ if (parcel && CFCClass_get_parcel(klass) != parcel) {
+ CFCUtil_die("Multiple parcels not yet supported.");
}
+ parcel = CFCClass_get_parcel(klass);
}
if (!parcel) {
CFCUtil_die("No source classes found.");