beautify/format source code with gnu indent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5364d135c7
commit
aa04c4c057
72 changed files with 27038 additions and 28016 deletions
|
|
@ -12,19 +12,16 @@ char cvsroot_module_cxx[] = "$Header$";
|
|||
#include "swigmod.h"
|
||||
|
||||
struct Module {
|
||||
ModuleFactory fac;
|
||||
char *name;
|
||||
Module *next;
|
||||
Module(const char *n, ModuleFactory f) {
|
||||
ModuleFactory fac;
|
||||
char *name;
|
||||
Module *next;
|
||||
Module(const char *n, ModuleFactory f) {
|
||||
fac = f;
|
||||
name = new char[strlen(n)+1];
|
||||
strcpy(name, n);
|
||||
next = 0;
|
||||
}
|
||||
|
||||
~Module()
|
||||
{
|
||||
delete[] name;
|
||||
name = new char[strlen(n) + 1];
|
||||
strcpy(name, n);
|
||||
next = 0;
|
||||
} ~Module() {
|
||||
delete[]name;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -37,7 +34,7 @@ static Module *modules = 0;
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void Swig_register_module(const char *n, ModuleFactory f) {
|
||||
Module *m = new Module(n,f);
|
||||
Module *m = new Module(n, f);
|
||||
m->next = modules;
|
||||
modules = m;
|
||||
}
|
||||
|
|
@ -51,7 +48,7 @@ void Swig_register_module(const char *n, ModuleFactory f) {
|
|||
ModuleFactory Swig_find_module(const char *name) {
|
||||
Module *m = modules;
|
||||
while (m) {
|
||||
if (strcmp(m->name,name) == 0) {
|
||||
if (strcmp(m->name, name) == 0) {
|
||||
return m->fac;
|
||||
}
|
||||
m = m->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue