From 4dfa0ed902a505d449d0fe01e41d3688198b7c37 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 18 Nov 2003 20:21:15 +0000 Subject: [PATCH] extern method declarations moved to header file git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5334 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/emit.cxx | 3 ++- Source/Modules/lang.cxx | 2 -- Source/Modules/overload.cxx | 2 -- Source/Modules/swigmain.cxx | 2 -- Source/Modules/swigmod.h | 53 +++++++++++++++++++++++-------------- 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/Source/Modules/emit.cxx b/Source/Modules/emit.cxx index df8efd57e..46267e803 100644 --- a/Source/Modules/emit.cxx +++ b/Source/Modules/emit.cxx @@ -16,7 +16,6 @@ char cvsroot_emit_cxx[] = "$Header$"; -extern SwigType *cplus_value_type(SwigType *t); extern int Swig_contract_mode_get(); /* ----------------------------------------------------------------------------- @@ -306,6 +305,7 @@ void emit_mark_varargs(ParmList *l) { } } +#if 0 /* replace_contract_args. This function replaces argument names in contract specifications. Used in conjunction with the %contract directive. */ @@ -320,6 +320,7 @@ void replace_contract_args(Parm *cp, Parm *rp, String *s) { rp = nextSibling(rp); } } +#endif /* ----------------------------------------------------------------------------- * int emit_action() diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index a659fa3c7..6f41f1243 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -320,8 +320,6 @@ static Node *first_nontemplate(Node *n) { * Handle swig pragma directives. * -------------------------------------------------------------------------- */ -extern void emit_constant_aggregation(String *s); - void swig_pragma(char *lang, char *name, char *value) { if (strcmp(lang,"swig") == 0) { if ((strcmp(name,"make_default") == 0) || ((strcmp(name,"makedefault") == 0))) { diff --git a/Source/Modules/overload.cxx b/Source/Modules/overload.cxx index 37a310107..6c1356be8 100644 --- a/Source/Modules/overload.cxx +++ b/Source/Modules/overload.cxx @@ -21,8 +21,6 @@ char cvsroot_overload_cxx[] = "$Header$"; String *argv_template_string; String *argc_template_string; -extern int emit_num_required(ParmList *); - /* ----------------------------------------------------------------------------- * Swig_overload_rank() * diff --git a/Source/Modules/swigmain.cxx b/Source/Modules/swigmain.cxx index 00a162cf5..8785c1ad3 100644 --- a/Source/Modules/swigmain.cxx +++ b/Source/Modules/swigmain.cxx @@ -103,8 +103,6 @@ int main(int argc, char **argv) { Language *dl = 0; ModuleFactory fac = 0; - extern int SWIG_main(int, char **, Language *); - #ifdef MACSWIG SIOUXSettings.asktosaveonclose = false; argc = ccommand(&argv); diff --git a/Source/Modules/swigmod.h b/Source/Modules/swigmod.h index f2664bebe..145ea53af 100644 --- a/Source/Modules/swigmod.h +++ b/Source/Modules/swigmod.h @@ -14,13 +14,16 @@ * $Header$ * ----------------------------------------------------------------------------- */ +#ifndef SWIGMOD_H_ +#define SWIGMOD_H_ + #include #include #include extern "C" { #include "swig.h" -extern Hash *Preprocessor_define(const String_or_char *str, int swigmacro); +Hash *Preprocessor_define(const String_or_char *str, int swigmacro); } #include "swigwarn.h" @@ -263,32 +266,42 @@ public: }; -extern int SWIG_main(int, char **, Language *); -extern void emit_args(SwigType *, ParmList *, Wrapper *f); -extern void SWIG_exit(int); /* use EXIT_{SUCCESS,FAILURE} */ -extern void SWIG_config_file(const String_or_char *); -extern const String *SWIG_output_directory(); -extern void SWIG_config_cppext(const char *ext); +int SWIG_main(int, char **, Language *); +void emit_args(SwigType *, ParmList *, Wrapper *f); +void SWIG_exit(int); /* use EXIT_{SUCCESS,FAILURE} */ +void SWIG_config_file(const String_or_char *); +const String *SWIG_output_directory(); +void SWIG_config_cppext(const char *ext); -extern "C" void SWIG_typemap_lang(const char *); -extern void SWIG_library_directory(const char *); -extern int emit_num_arguments(ParmList *); -extern int emit_num_required(ParmList *); -extern int emit_isvarargs(ParmList *); -extern void emit_attach_parmmaps(ParmList *, Wrapper *f); -extern void emit_mark_varargs(ParmList *l); -extern void emit_action(Node *n, Wrapper *f); -extern List *Swig_overload_rank(Node *n); -extern String *Swig_overload_dispatch(Node *n, const String_or_char *fmt, int *); +void SWIG_library_directory(const char *); +int emit_num_arguments(ParmList *); +int emit_num_required(ParmList *); +int emit_isvarargs(ParmList *); +void emit_attach_parmmaps(ParmList *, Wrapper *f); +void emit_mark_varargs(ParmList *l); +void emit_action(Node *n, Wrapper *f); +List *Swig_overload_rank(Node *n); +String *Swig_overload_dispatch(Node *n, const String_or_char *fmt, int *); +SwigType *cplus_value_type(SwigType *t); + +/* directors.cxx start */ +String *Swig_csuperclass_call(String* base, String* method, ParmList* l); +String *Swig_class_declaration(Node *n, String *name); +String *Swig_class_name(Node *n); +String *Swig_method_call(String_or_char *name, ParmList *parms); +String *Swig_method_decl(SwigType *s, const String_or_char *id, List *args, int strip, int values); +String *Swig_director_declaration(Node *n); +/* directors.cxx end */ extern "C" { + void SWIG_typemap_lang(const char *); typedef Language *(*ModuleFactory)(void); } -extern void Swig_register_module(const char *name, ModuleFactory fac); -extern ModuleFactory Swig_find_module(const char *name); +void Swig_register_module(const char *name, ModuleFactory fac); +ModuleFactory Swig_find_module(const char *name); -/* swig11.h ends here */ +#endif