cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
33cfa55484
commit
797317163a
16 changed files with 90 additions and 103 deletions
|
|
@ -495,4 +495,4 @@ SWIGEXPORT int SWIG_import(lua_State* L)
|
|||
/* Note: the initialization function is closed after all code is generated */
|
||||
|
||||
|
||||
/*************************** end lua.swg ******************************/
|
||||
/* ------------------------------ end lua.swg ------------------------------ */
|
||||
|
|
|
|||
|
|
@ -623,4 +623,4 @@ SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
|
|||
}
|
||||
#endif
|
||||
|
||||
/*************************** end luarun.swg ******************************/
|
||||
/* ------------------------------ end luarun.swg ------------------------------ */
|
||||
|
|
|
|||
|
|
@ -7,13 +7,6 @@
|
|||
* 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
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -99,8 +99,9 @@ extern "C" {
|
|||
$1 = &temp;
|
||||
}
|
||||
|
||||
/************************ Output Typemaps *****************************/
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Output Typemaps
|
||||
* ----------------------------------------------------------------------------- */
|
||||
%typemap(out, pikedesc="tInt")
|
||||
int, unsigned int,
|
||||
short, unsigned short,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/********************************************************************************
|
||||
/* -----------------------------------------------------------------------------
|
||||
*
|
||||
* User interfaces: include these ones as needed
|
||||
*
|
||||
********************************************************************************/
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* 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
|
||||
*
|
||||
********************************************************************************/
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Basic files
|
||||
|
|
|
|||
|
|
@ -4,14 +4,10 @@
|
|||
*
|
||||
* 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 */
|
||||
#define SWIG_POINTER_EXCEPTION 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*************************************************************************
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Type initialization:
|
||||
* This problem is tough by the requirement that no dynamic
|
||||
* 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
|
||||
* array with the correct data and linking the correct swig_cast_info
|
||||
* structures together.
|
||||
|
||||
*
|
||||
* The generated swig_type_info structures are assigned staticly to an initial
|
||||
* 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
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
* 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
|
||||
* 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.
|
||||
* There are three cases to handle:
|
||||
* 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
|
||||
* swig_cast_info to the linked list (because the cast->type) pointer will
|
||||
* be correct.
|
||||
**/
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
/***********************************************************************
|
||||
*
|
||||
/* -----------------------------------------------------------------------------
|
||||
* This section contains generic SWIG labels for method/variable
|
||||
* declarations/attributes, and other compiler dependent labels.
|
||||
*
|
||||
************************************************************************/
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
||||
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
/***********************************************************************
|
||||
/* -----------------------------------------------------------------------------
|
||||
* swigrun.swg
|
||||
*
|
||||
* This file contains generic CAPI SWIG runtime support for pointer
|
||||
* type checking.
|
||||
*
|
||||
************************************************************************/
|
||||
* This file contains generic CAPI SWIG runtime support for pointer
|
||||
* type checking.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* This should only be incremented when either the layout of swig_type_info changes,
|
||||
or for whatever reason, the runtime changes incompatibly */
|
||||
|
|
|
|||
|
|
@ -147,11 +147,11 @@ scanner_locator(String *loc) {
|
|||
}
|
||||
#endif
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_init()
|
||||
*
|
||||
* Initialize buffers
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void scanner_init() {
|
||||
yybuffer = (char *) malloc(YYBSIZE);
|
||||
|
|
@ -161,11 +161,11 @@ void scanner_init() {
|
|||
scanner_ccode = NewStringEmpty();
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_file(FILE *f)
|
||||
*
|
||||
* Start reading from new file
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
void scanner_file(DOHFile *f) {
|
||||
InFile *in;
|
||||
|
||||
|
|
@ -180,11 +180,11 @@ void scanner_file(DOHFile *f) {
|
|||
cparse_line = 1;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_close()
|
||||
*
|
||||
* Close current input file and go to next
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void scanner_close() {
|
||||
InFile *p;
|
||||
|
|
@ -202,13 +202,13 @@ void scanner_close() {
|
|||
in_head = p;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* char nextchar()
|
||||
*
|
||||
* gets next character from input.
|
||||
* If we're in inlining mode, we actually retrieve a character
|
||||
* from inline_yybuffer instead.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
char nextchar() {
|
||||
int c = 0;
|
||||
|
|
@ -248,7 +248,7 @@ void retract(int n) {
|
|||
if (yylen < 0) yylen = 0;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* start_inline(char *text, int line)
|
||||
*
|
||||
* 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
|
||||
* as a new fragment.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void start_inline(char *text, int line) {
|
||||
InFile *in;
|
||||
|
|
@ -277,11 +277,11 @@ void start_inline(char *text, int line) {
|
|||
cparse_line = line;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* yycomment(char *, int line)
|
||||
*
|
||||
* Inserts a comment into a documentation entry.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
void yycomment(char *a, int b, int c) {
|
||||
|
|
@ -361,7 +361,7 @@ skip_balanced(int startchar, int endchar) {
|
|||
return;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* void skip_decl(void)
|
||||
*
|
||||
* This tries to skip over an entire declaration. For example
|
||||
|
|
@ -371,7 +371,7 @@ skip_balanced(int startchar, int endchar) {
|
|||
* or
|
||||
* friend ostream& operator<<(ostream&, const char *s) { };
|
||||
*
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void skip_decl(void) {
|
||||
char c;
|
||||
|
|
@ -507,12 +507,12 @@ static void get_escape() {
|
|||
return;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* int yylook()
|
||||
*
|
||||
* Lexical scanner.
|
||||
* See Aho,Sethi, and Ullman, pg. 106
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
int yylook(void) {
|
||||
|
||||
|
|
@ -1036,11 +1036,11 @@ void scanner_next_token(int tok) {
|
|||
next_token = tok;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* int yylex()
|
||||
*
|
||||
* Gets the lexene and returns tokens.
|
||||
*************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
int yylex(void) {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ static contract Rules[] = {
|
|||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* class Contracts:
|
||||
*
|
||||
* This class defines the functions that need to be used in
|
||||
* "wrap by contract" module.
|
||||
*************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
class Contracts : public Dispatcher {
|
||||
String *make_expression(String *s, Node *n);
|
||||
|
|
|
|||
|
|
@ -1454,9 +1454,9 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* BEGIN C++ Director Class modifications
|
||||
***************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Modified polymorphism code for Ocaml language module.
|
||||
|
|
|
|||
|
|
@ -1061,38 +1061,38 @@ public:
|
|||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*** OBJECT-ORIENTED FEATURES
|
||||
****************************************************************************
|
||||
*** These extensions provide a more object-oriented interface to C++
|
||||
*** classes and structures. The code here is based on extensions
|
||||
*** provided by David Fletcher and Gary Holt.
|
||||
***
|
||||
*** I have generalized these extensions to make them more general purpose
|
||||
*** and to resolve object-ownership problems.
|
||||
***
|
||||
*** The approach here is very similar to the Python module :
|
||||
*** 1. All of the original methods are placed into a single
|
||||
*** package like before except that a 'c' is appended to the
|
||||
*** package name.
|
||||
***
|
||||
*** 2. All methods and function calls are wrapped with a new
|
||||
*** perl function. While possibly inefficient this allows
|
||||
*** us to catch complex function arguments (which are hard to
|
||||
*** track otherwise).
|
||||
***
|
||||
*** 3. Classes are represented as tied-hashes in a manner similar
|
||||
*** to Gary Holt's extension. This allows us to access
|
||||
*** member data.
|
||||
***
|
||||
*** 4. Stand-alone (global) C functions are modified to take
|
||||
*** tied hashes as arguments for complex datatypes (if
|
||||
*** appropriate).
|
||||
***
|
||||
*** 5. Global variables involving a class/struct is encapsulated
|
||||
*** in a tied hash.
|
||||
***
|
||||
****************************************************************************/
|
||||
/* ----------------------------------------------------------------------------
|
||||
* OBJECT-ORIENTED FEATURES
|
||||
*
|
||||
* These extensions provide a more object-oriented interface to C++
|
||||
* classes and structures. The code here is based on extensions
|
||||
* provided by David Fletcher and Gary Holt.
|
||||
*
|
||||
* I have generalized these extensions to make them more general purpose
|
||||
* and to resolve object-ownership problems.
|
||||
*
|
||||
* The approach here is very similar to the Python module :
|
||||
* 1. All of the original methods are placed into a single
|
||||
* package like before except that a 'c' is appended to the
|
||||
* package name.
|
||||
*
|
||||
* 2. All methods and function calls are wrapped with a new
|
||||
* perl function. While possibly inefficient this allows
|
||||
* us to catch complex function arguments (which are hard to
|
||||
* track otherwise).
|
||||
*
|
||||
* 3. Classes are represented as tied-hashes in a manner similar
|
||||
* to Gary Holt's extension. This allows us to access
|
||||
* member data.
|
||||
*
|
||||
* 4. Stand-alone (global) C functions are modified to take
|
||||
* tied hashes as arguments for complex datatypes (if
|
||||
* appropriate).
|
||||
*
|
||||
* 5. Global variables involving a class/struct is encapsulated
|
||||
* in a tied hash.
|
||||
*
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
void setclassname(Node *n) {
|
||||
|
|
|
|||
|
|
@ -2360,9 +2360,9 @@ public:
|
|||
|
||||
|
||||
|
||||
/*************************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* BEGIN C++ Director Class modifications
|
||||
************************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* C++/Python polymorphism demo code, copyright (C) 2002 Mark Rose <mrose@stm.lbl.gov>
|
||||
*
|
||||
|
|
@ -2558,9 +2558,9 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* END of C++ Director Class modifications
|
||||
************************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ protected:
|
|||
AccessMode cplus_mode;
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* class language:
|
||||
*
|
||||
* This class defines the functions that need to be supported by the
|
||||
* scripting language being used. The translator calls these virtual
|
||||
* functions to output different types of code for different languages.
|
||||
*************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
class Language : public Dispatcher {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1324,14 +1324,14 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) {
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*** * * * WARNING * * * ***
|
||||
*** ***
|
||||
*** 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 ***
|
||||
*** and you are prepared to suffer endless hours of agony trying to ***
|
||||
*** debug the SWIG run-time type checker after you break it. ***
|
||||
******************************************************************************/
|
||||
/* ----------------------------------------------------------------------------
|
||||
* * * * WARNING * * * ***
|
||||
* ***
|
||||
* 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 ***
|
||||
* and you are prepared to suffer endless hours of agony trying to ***
|
||||
* debug the SWIG run-time type checker after you break it. ***
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SwigType_remember()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue