Added a -nounit argument, which does not export the (declare (unit ...))
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
01e134d72a
commit
69076dd0da
1 changed files with 7 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ CHICKEN Options (available with -chicken)\n\
|
||||||
-closprefix <prefix> - Prepend <prefix> to all clos identifiers\n\
|
-closprefix <prefix> - Prepend <prefix> to all clos identifiers\n\
|
||||||
-useclassprefix - Prepend the class name to all clos identifiers\n\
|
-useclassprefix - Prepend the class name to all clos identifiers\n\
|
||||||
-unhideprimitive - Unhide the primitive: symbols\n\
|
-unhideprimitive - Unhide the primitive: symbols\n\
|
||||||
|
-nounit - Do not (declare (unit ...)) in scheme file\n\
|
||||||
\n"
|
\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -65,6 +66,7 @@ static String *closprefix = 0;
|
||||||
static String *memberfunction_name = 0;
|
static String *memberfunction_name = 0;
|
||||||
static int hide_primitive = 1;
|
static int hide_primitive = 1;
|
||||||
static Hash *primitive_names = 0;
|
static Hash *primitive_names = 0;
|
||||||
|
static int declare_unit = 1;
|
||||||
|
|
||||||
class CHICKEN : public Language {
|
class CHICKEN : public Language {
|
||||||
public:
|
public:
|
||||||
|
|
@ -148,6 +150,9 @@ CHICKEN::main(int argc, char *argv[])
|
||||||
} else if (strcmp(argv[i],"-unhideprimitive") == 0) {
|
} else if (strcmp(argv[i],"-unhideprimitive") == 0) {
|
||||||
hide_primitive = 0;
|
hide_primitive = 0;
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
|
} else if (strcmp(argv[i],"-nounit") == 0) {
|
||||||
|
declare_unit = 0;
|
||||||
|
Swig_mark_arg(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -239,7 +244,8 @@ CHICKEN::top(Node *n)
|
||||||
";; This file was created automatically by SWIG.\n",
|
";; This file was created automatically by SWIG.\n",
|
||||||
";; Don't modify this file, modify the SWIG interface instead.\n",
|
";; Don't modify this file, modify the SWIG interface instead.\n",
|
||||||
NIL);
|
NIL);
|
||||||
Printv(f_scm,"(declare (unit ", scmmodule, "))\n\n", NIL);
|
if (declare_unit)
|
||||||
|
Printv(f_scm,"(declare (unit ", scmmodule, "))\n\n", NIL);
|
||||||
Printv(f_scm,"(declare \n",
|
Printv(f_scm,"(declare \n",
|
||||||
tab4, "(hide swig-init)\n",
|
tab4, "(hide swig-init)\n",
|
||||||
tab4, "(foreign-declare \"C_extern void swig_", module, "_init(C_word,C_word,C_word) C_noret;\"))\n", NIL);
|
tab4, "(foreign-declare \"C_extern void swig_", module, "_init(C_word,C_word,C_word) C_noret;\"))\n", NIL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue