Substantial changes for new module system.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@908 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
44f72308da
commit
5c39b4bc22
12 changed files with 1007 additions and 845 deletions
37
SWIG/Source/Modules/init.c
Normal file
37
SWIG/Source/Modules/init.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* init.c
|
||||
*
|
||||
* Initialize built-in SWIG modules.
|
||||
*
|
||||
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
|
||||
*
|
||||
* Copyright (C) 1999-2000. The University of Chicago
|
||||
* See the file LICENSE for information on usage and redistribution.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#include "swig.h"
|
||||
|
||||
extern void testmodule();
|
||||
|
||||
static void (*modules[])(void) = {
|
||||
testmodule,
|
||||
0
|
||||
};
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* init_modules()
|
||||
*
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void init_modules() {
|
||||
int i = 0;
|
||||
while (modules[i]) {
|
||||
(*modules[i])();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
init_modules();
|
||||
return Swig_main(argc, argv);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue