Add CFCFunction_public()
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c6ef5a75 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c6ef5a75 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c6ef5a75 Branch: refs/heads/c-bindings-wip1 Commit: c6ef5a75841f0a76ca8c29aabf0c661259ff83d2 Parents: 31aeb8b Author: Nick Wellnhofer <[email protected]> Authored: Sun Dec 23 22:30:33 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Dec 23 22:30:33 2012 +0100 ---------------------------------------------------------------------- clownfish/compiler/src/CFCFunction.c | 5 +++++ clownfish/compiler/src/CFCFunction.h | 3 +++ clownfish/compiler/src/CFCPerlPod.c | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/c6ef5a75/clownfish/compiler/src/CFCFunction.c ---------------------------------------------------------------------- diff --git a/clownfish/compiler/src/CFCFunction.c b/clownfish/compiler/src/CFCFunction.c index a125f37..c81660b 100644 --- a/clownfish/compiler/src/CFCFunction.c +++ b/clownfish/compiler/src/CFCFunction.c @@ -131,3 +131,8 @@ CFCFunction_micro_sym(CFCFunction *self) { return CFCSymbol_micro_sym((CFCSymbol*)self); } +int +CFCFunction_public(CFCFunction *self) { + return CFCSymbol_public((CFCSymbol*)self); +} + http://git-wip-us.apache.org/repos/asf/lucy/blob/c6ef5a75/clownfish/compiler/src/CFCFunction.h ---------------------------------------------------------------------- diff --git a/clownfish/compiler/src/CFCFunction.h b/clownfish/compiler/src/CFCFunction.h index 8c9c235..e69b632 100644 --- a/clownfish/compiler/src/CFCFunction.h +++ b/clownfish/compiler/src/CFCFunction.h @@ -107,6 +107,9 @@ CFCFunction_short_func_sym(CFCFunction *self); const char* CFCFunction_micro_sym(CFCFunction *self); +int +CFCFunction_public(CFCFunction *self); + #ifdef __cplusplus } #endif http://git-wip-us.apache.org/repos/asf/lucy/blob/c6ef5a75/clownfish/compiler/src/CFCPerlPod.c ---------------------------------------------------------------------- diff --git a/clownfish/compiler/src/CFCPerlPod.c b/clownfish/compiler/src/CFCPerlPod.c index ae03305..ad33b55 100644 --- a/clownfish/compiler/src/CFCPerlPod.c +++ b/clownfish/compiler/src/CFCPerlPod.c @@ -26,7 +26,6 @@ #include "CFCParamList.h" #include "CFCFunction.h" #include "CFCDocuComment.h" -#include "CFCSymbol.h" #ifndef true #define true 1 @@ -270,7 +269,7 @@ CFCPerlPod_gen_subroutine_pod(CFCPerlPod *self, CFCFunction *func, const char *code_sample, const char *class_name, int is_constructor) { // Only allow "public" subs to be exposed as part of the public API. - if (!CFCSymbol_public((CFCSymbol*)func)) { + if (!CFCFunction_public(func)) { CFCUtil_die("%s#%s is not public", class_name, alias); }
