From fa996e1f9e63a1e14908b77cebebe28145f4bacb Mon Sep 17 00:00:00 2001 From: Surendra Singhi Date: Sat, 23 Jul 2005 05:34:11 +0000 Subject: [PATCH] Added support for pointer to functions. Added support for typedefs and a option which will allow to generate "def-c-type" for typedefs. Joerg Hoehle suggested that while declaring arrays "c-ptr" should be used. Changed the name of generate-all option to extern-all. Now declaring pointers to integers, short, float and double as c-ptr instead of c-pointer. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7348 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/clisp.cxx | 155 +++++++++++++++++++++++++--------- 1 file changed, 116 insertions(+), 39 deletions(-) diff --git a/SWIG/Source/Modules/clisp.cxx b/SWIG/Source/Modules/clisp.cxx index 0fa4c9eb6..bfc0876a3 100644 --- a/SWIG/Source/Modules/clisp.cxx +++ b/SWIG/Source/Modules/clisp.cxx @@ -23,12 +23,15 @@ public: virtual int variableWrapper(Node *n); virtual int constantWrapper(Node *n); virtual int classDeclaration(Node *n); + virtual int typedefHandler(Node *n); List *entries; private: String* get_ffi_type(SwigType *ty); String* convert_literal(String *num_param, String *type); String* strip_parens(String *string); - int generate_all_flag; + int extern_all_flag; + int generate_typedef_flag; + int is_function; }; void CLISP :: main(int argc, char *argv[]) { @@ -36,25 +39,33 @@ void CLISP :: main(int argc, char *argv[]) { SWIG_library_directory("clisp"); SWIG_config_file("clisp.swg"); - generate_all_flag = 0; + generate_typedef_flag = 0; + extern_all_flag=0; for(i=1; i