use better names aliasobj0/noaliasobj0

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-18 02:30:09 +00:00
commit 3177fe8f2b
2 changed files with 31 additions and 11 deletions

View file

@ -67,7 +67,7 @@ static int safecstrings = 0;
static int dirvtable = 0;
static int proxydel = 1;
static int fastunpack = 0;
static int keepobj0 = 0;
static int aliasobj0 = 0;
/* flags for the make_autodoc function */
enum autodoc_t {
@ -109,8 +109,8 @@ Python Options (available with -python)\n\
-noproxydel - Don't generate the redundant __del__ method \n\
-fastunpack - Use fast unpack mechanism to parse the argument functions \n\
-nofastunpack - Use traditional UnpackTuple method to parse the argument functions (default) \n\
-keepobj0 - Keep obj0 when using fastunpack, needed for some users typemaps \n\
-nokeepobj0 - Don't generate obj0 when using fastunpack (default) \n\
-aliasobj0 - Alias obj0 when using fastunpack, needed for some old typemaps \n\
-noaliasobj0 - Don't generate an obj0 alias when using fastunpack (default) \n\
-O - Enable several old and new optimizations options: \n\
-modern -fastdispatch -dirvtable -nosafecstrings -fvirtual -noproxydel -fastunpack\n\
\n";
@ -290,11 +290,11 @@ public:
} else if (strcmp(argv[i],"-nofastunpack") == 0) {
fastunpack = 0;
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-keepobj0") == 0) {
keepobj0 = 1;
} else if (strcmp(argv[i],"-aliasobj0") == 0) {
aliasobj0 = 1;
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-nokeepobj0") == 0) {
keepobj0 = 0;
} else if (strcmp(argv[i],"-noaliasobj0") == 0) {
aliasobj0 = 0;
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-proxydel") == 0) {
proxydel = 1;
@ -1475,13 +1475,13 @@ public:
/* Generate code for argument marshalling */
if (funpack) {
if (overname) {
if (keepobj0) {
if (aliasobj0) {
Printf(f->code, "#define obj0 (swig_obj[0])\n");
}
} else if (num_arguments) {
sprintf(source,"PyObject *swig_obj[%d]",num_arguments);
Wrapper_add_localv(f, "swig_obj", source, NIL);
if (keepobj0) {
if (aliasobj0) {
Printf(f->code, "#define obj0 (swig_obj[0])\n");
}
}
@ -1850,7 +1850,7 @@ public:
if (funpack) {
if (keepobj0) {
if (aliasobj0) {
Printf(f->code, "#if defined(obj0)\n");
Printf(f->code, "#undef obj0\n");
Printf(f->code, "#endif\n");