cosmetics

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-07 22:02:54 +00:00
commit 4f9d3e819f
16 changed files with 90 additions and 103 deletions

View file

@ -495,4 +495,4 @@ SWIGEXPORT int SWIG_import(lua_State* L)
/* Note: the initialization function is closed after all code is generated */ /* Note: the initialization function is closed after all code is generated */
/*************************** end lua.swg ******************************/ /* ------------------------------ end lua.swg ------------------------------ */

View file

@ -623,4 +623,4 @@ SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
} }
#endif #endif
/*************************** end luarun.swg ******************************/ /* ------------------------------ end luarun.swg ------------------------------ */

View file

@ -7,13 +7,6 @@
* SWIG Library file containing the main typemap code to support Lua modules. * SWIG Library file containing the main typemap code to support Lua modules.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
/***********************************************************************
*
* This file contains the main typemap code to support Lua modules
*
* Author : Mark Gossage (mark@gossage.cjb.net)
************************************************************************/
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Basic inout typemaps * Basic inout typemaps
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */

View file

@ -99,8 +99,9 @@ extern "C" {
$1 = &temp; $1 = &temp;
} }
/************************ Output Typemaps *****************************/ /* -----------------------------------------------------------------------------
* Output Typemaps
* ----------------------------------------------------------------------------- */
%typemap(out, pikedesc="tInt") %typemap(out, pikedesc="tInt")
int, unsigned int, int, unsigned int,
short, unsigned short, short, unsigned short,

View file

@ -1,8 +1,8 @@
/******************************************************************************** /* -----------------------------------------------------------------------------
* *
* User interfaces: include these ones as needed * User interfaces: include these ones as needed
* *
********************************************************************************/ * ----------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Special types and user helpers * Special types and user helpers
@ -50,11 +50,11 @@ std_wstring.i wstring
/******************************************************************************** /* -----------------------------------------------------------------------------
/* /*
* Implementation files: don't look at them unless you are realy drunk * Implementation files: don't look at them unless you are realy drunk
* *
********************************************************************************/ * ----------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Basic files * Basic files

View file

@ -4,14 +4,10 @@
* *
* rubyrun.swg * rubyrun.swg
* *
* This file contains the runtime support for Ruby modules
* and includes code for managing global variables and pointer
* type checking.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
/***********************************************************************
*
* This file contains the runtime support for Ruby modules
* and includes code for managing global variables and pointer
* type checking.
*
************************************************************************/
/* For backward compatibility only */ /* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION 0 #define SWIG_POINTER_EXCEPTION 0

View file

@ -1,4 +1,4 @@
/************************************************************************* /* -----------------------------------------------------------------------------
* Type initialization: * Type initialization:
* This problem is tough by the requirement that no dynamic * This problem is tough by the requirement that no dynamic
* memory is used. Also, since swig_type_info structures store pointers to * memory is used. Also, since swig_type_info structures store pointers to
@ -10,7 +10,7 @@
* swig_module, and does all the lookup, filling in the swig_module.types * swig_module, and does all the lookup, filling in the swig_module.types
* array with the correct data and linking the correct swig_cast_info * array with the correct data and linking the correct swig_cast_info
* structures together. * structures together.
*
* The generated swig_type_info structures are assigned staticly to an initial * The generated swig_type_info structures are assigned staticly to an initial
* array. We just loop though that array, and handle each type individually. * array. We just loop though that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the * First we lookup if this type has been already loaded, and if so, use the
@ -24,7 +24,7 @@
* we find the array of casts associated with the type, and loop through it * we find the array of casts associated with the type, and loop through it
* adding the casts to the list. The one last trick we need to do is making * adding the casts to the list. The one last trick we need to do is making
* sure the type pointer in the swig_cast_info struct is correct. * sure the type pointer in the swig_cast_info struct is correct.
*
* First off, we lookup the cast->type name to see if it is already loaded. * First off, we lookup the cast->type name to see if it is already loaded.
* There are three cases to handle: * There are three cases to handle:
* 1) If the cast->type has already been loaded AND the type we are adding * 1) If the cast->type has already been loaded AND the type we are adding
@ -37,7 +37,7 @@
* 3) Finally, if cast->type has not already been loaded, then we add that * 3) Finally, if cast->type has not already been loaded, then we add that
* swig_cast_info to the linked list (because the cast->type) pointer will * swig_cast_info to the linked list (because the cast->type) pointer will
* be correct. * be correct.
**/ * ----------------------------------------------------------------------------- */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -1,9 +1,7 @@
/*********************************************************************** /* -----------------------------------------------------------------------------
*
* This section contains generic SWIG labels for method/variable * This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels. * declarations/attributes, and other compiler dependent labels.
* * ----------------------------------------------------------------------------- */
************************************************************************/
/* template workaround for compilers that cannot correctly implement the C++ standard */ /* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR #ifndef SWIGTEMPLATEDISAMBIGUATOR

View file

@ -1,10 +1,9 @@
/*********************************************************************** /* -----------------------------------------------------------------------------
* swigrun.swg * swigrun.swg
* *
* This file contains generic CAPI SWIG runtime support for pointer * This file contains generic CAPI SWIG runtime support for pointer
* type checking. * type checking.
* * ----------------------------------------------------------------------------- */
************************************************************************/
/* This should only be incremented when either the layout of swig_type_info changes, /* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */ or for whatever reason, the runtime changes incompatibly */

View file

@ -147,11 +147,11 @@ scanner_locator(String *loc) {
} }
#endif #endif
/************************************************************** /* ----------------------------------------------------------------------------
* scanner_init() * scanner_init()
* *
* Initialize buffers * Initialize buffers
**************************************************************/ * ------------------------------------------------------------------------- */
void scanner_init() { void scanner_init() {
yybuffer = (char *) malloc(YYBSIZE); yybuffer = (char *) malloc(YYBSIZE);
@ -161,11 +161,11 @@ void scanner_init() {
scanner_ccode = NewStringEmpty(); scanner_ccode = NewStringEmpty();
} }
/************************************************************** /* ----------------------------------------------------------------------------
* scanner_file(FILE *f) * scanner_file(FILE *f)
* *
* Start reading from new file * Start reading from new file
**************************************************************/ * ------------------------------------------------------------------------- */
void scanner_file(DOHFile *f) { void scanner_file(DOHFile *f) {
InFile *in; InFile *in;
@ -180,11 +180,11 @@ void scanner_file(DOHFile *f) {
cparse_line = 1; cparse_line = 1;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* scanner_close() * scanner_close()
* *
* Close current input file and go to next * Close current input file and go to next
**************************************************************/ * ------------------------------------------------------------------------- */
void scanner_close() { void scanner_close() {
InFile *p; InFile *p;
@ -202,13 +202,13 @@ void scanner_close() {
in_head = p; in_head = p;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* char nextchar() * char nextchar()
* *
* gets next character from input. * gets next character from input.
* If we're in inlining mode, we actually retrieve a character * If we're in inlining mode, we actually retrieve a character
* from inline_yybuffer instead. * from inline_yybuffer instead.
**************************************************************/ * ------------------------------------------------------------------------- */
char nextchar() { char nextchar() {
int c = 0; int c = 0;
@ -248,7 +248,7 @@ void retract(int n) {
if (yylen < 0) yylen = 0; if (yylen < 0) yylen = 0;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* start_inline(char *text, int line) * start_inline(char *text, int line)
* *
* This grabs a chunk of text and tries to inline it into * This grabs a chunk of text and tries to inline it into
@ -257,7 +257,7 @@ void retract(int n) {
* *
* If we're already in inlining mode, we will save the code * If we're already in inlining mode, we will save the code
* as a new fragment. * as a new fragment.
**************************************************************/ * ------------------------------------------------------------------------- */
void start_inline(char *text, int line) { void start_inline(char *text, int line) {
InFile *in; InFile *in;
@ -277,11 +277,11 @@ void start_inline(char *text, int line) {
cparse_line = line; cparse_line = line;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* yycomment(char *, int line) * yycomment(char *, int line)
* *
* Inserts a comment into a documentation entry. * Inserts a comment into a documentation entry.
**************************************************************/ * ------------------------------------------------------------------------- */
/* /*
void yycomment(char *a, int b, int c) { void yycomment(char *a, int b, int c) {
@ -361,7 +361,7 @@ skip_balanced(int startchar, int endchar) {
return; return;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* void skip_decl(void) * void skip_decl(void)
* *
* This tries to skip over an entire declaration. For example * This tries to skip over an entire declaration. For example
@ -371,7 +371,7 @@ skip_balanced(int startchar, int endchar) {
* or * or
* friend ostream& operator<<(ostream&, const char *s) { }; * friend ostream& operator<<(ostream&, const char *s) { };
* *
**************************************************************/ * ------------------------------------------------------------------------- */
void skip_decl(void) { void skip_decl(void) {
char c; char c;
@ -507,12 +507,12 @@ static void get_escape() {
return; return;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* int yylook() * int yylook()
* *
* Lexical scanner. * Lexical scanner.
* See Aho,Sethi, and Ullman, pg. 106 * See Aho,Sethi, and Ullman, pg. 106
**************************************************************/ * ------------------------------------------------------------------------- */
int yylook(void) { int yylook(void) {
@ -1036,11 +1036,11 @@ void scanner_next_token(int tok) {
next_token = tok; next_token = tok;
} }
/************************************************************** /* ----------------------------------------------------------------------------
* int yylex() * int yylex()
* *
* Gets the lexene and returns tokens. * Gets the lexene and returns tokens.
*************************************************************/ * ------------------------------------------------------------------------- */
int yylex(void) { int yylex(void) {

View file

@ -27,12 +27,12 @@ static contract Rules[] = {
{ NULL, NULL} { NULL, NULL}
}; };
/************************************************************************ /* ----------------------------------------------------------------------------
* class Contracts: * class Contracts:
* *
* This class defines the functions that need to be used in * This class defines the functions that need to be used in
* "wrap by contract" module. * "wrap by contract" module.
*************************************************************************/ * ------------------------------------------------------------------------- */
class Contracts : public Dispatcher { class Contracts : public Dispatcher {
String *make_expression(String *s, Node *n); String *make_expression(String *s, Node *n);

View file

@ -1454,9 +1454,9 @@ public:
return ret; return ret;
} }
/*************************************************************************** /* ----------------------------------------------------------------------------
* BEGIN C++ Director Class modifications * BEGIN C++ Director Class modifications
***************************************************************************/ * ------------------------------------------------------------------------- */
/* /*
* Modified polymorphism code for Ocaml language module. * Modified polymorphism code for Ocaml language module.

View file

@ -1061,38 +1061,38 @@ public:
return SWIG_OK; return SWIG_OK;
} }
/**************************************************************************** /* ----------------------------------------------------------------------------
*** OBJECT-ORIENTED FEATURES * OBJECT-ORIENTED FEATURES
**************************************************************************** *
*** These extensions provide a more object-oriented interface to C++ * These extensions provide a more object-oriented interface to C++
*** classes and structures. The code here is based on extensions * classes and structures. The code here is based on extensions
*** provided by David Fletcher and Gary Holt. * provided by David Fletcher and Gary Holt.
*** *
*** I have generalized these extensions to make them more general purpose * I have generalized these extensions to make them more general purpose
*** and to resolve object-ownership problems. * and to resolve object-ownership problems.
*** *
*** The approach here is very similar to the Python module : * The approach here is very similar to the Python module :
*** 1. All of the original methods are placed into a single * 1. All of the original methods are placed into a single
*** package like before except that a 'c' is appended to the * package like before except that a 'c' is appended to the
*** package name. * package name.
*** *
*** 2. All methods and function calls are wrapped with a new * 2. All methods and function calls are wrapped with a new
*** perl function. While possibly inefficient this allows * perl function. While possibly inefficient this allows
*** us to catch complex function arguments (which are hard to * us to catch complex function arguments (which are hard to
*** track otherwise). * track otherwise).
*** *
*** 3. Classes are represented as tied-hashes in a manner similar * 3. Classes are represented as tied-hashes in a manner similar
*** to Gary Holt's extension. This allows us to access * to Gary Holt's extension. This allows us to access
*** member data. * member data.
*** *
*** 4. Stand-alone (global) C functions are modified to take * 4. Stand-alone (global) C functions are modified to take
*** tied hashes as arguments for complex datatypes (if * tied hashes as arguments for complex datatypes (if
*** appropriate). * appropriate).
*** *
*** 5. Global variables involving a class/struct is encapsulated * 5. Global variables involving a class/struct is encapsulated
*** in a tied hash. * in a tied hash.
*** *
****************************************************************************/ * ------------------------------------------------------------------------- */
void setclassname(Node *n) { void setclassname(Node *n) {

View file

@ -2360,9 +2360,9 @@ public:
/************************************************************************************* /* ----------------------------------------------------------------------------
* BEGIN C++ Director Class modifications * BEGIN C++ Director Class modifications
************************************************************************************/ * ------------------------------------------------------------------------- */
/* C++/Python polymorphism demo code, copyright (C) 2002 Mark Rose <mrose@stm.lbl.gov> /* C++/Python polymorphism demo code, copyright (C) 2002 Mark Rose <mrose@stm.lbl.gov>
* *
@ -2558,9 +2558,9 @@ public:
return result; return result;
} }
/************************************************************************************* /* ----------------------------------------------------------------------------
* END of C++ Director Class modifications * END of C++ Director Class modifications
************************************************************************************/ * ------------------------------------------------------------------------- */
/* ------------------------------------------------------------ /* ------------------------------------------------------------

View file

@ -102,13 +102,13 @@ protected:
AccessMode cplus_mode; AccessMode cplus_mode;
}; };
/************************************************************************ /* ----------------------------------------------------------------------------
* class language: * class language:
* *
* This class defines the functions that need to be supported by the * This class defines the functions that need to be supported by the
* scripting language being used. The translator calls these virtual * scripting language being used. The translator calls these virtual
* functions to output different types of code for different languages. * functions to output different types of code for different languages.
*************************************************************************/ * ------------------------------------------------------------------------- */
class Language : public Dispatcher { class Language : public Dispatcher {
public: public:

View file

@ -1324,14 +1324,14 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) {
} }
} }
/****************************************************************************** /* ----------------------------------------------------------------------------
*** * * * WARNING * * * *** * * * * WARNING * * * ***
*** *** * ***
*** Don't even think about modifying anything below this line unless you *** * Don't even think about modifying anything below this line unless you ***
*** are completely on top of *EVERY* subtle aspect of the C++ type system *** * are completely on top of *EVERY* subtle aspect of the C++ type system ***
*** and you are prepared to suffer endless hours of agony trying to *** * and you are prepared to suffer endless hours of agony trying to ***
*** debug the SWIG run-time type checker after you break it. *** * debug the SWIG run-time type checker after you break it. ***
******************************************************************************/ * ------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* SwigType_remember() * SwigType_remember()