vararg support for Java and C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4575 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
128f46cece
commit
53f8457aa6
4 changed files with 52 additions and 4 deletions
|
|
@ -1320,11 +1320,19 @@ class CSHARP : public Language {
|
|||
if (!static_flag)
|
||||
Printv(nativecall, "swigCPtr", NIL);
|
||||
|
||||
emit_mark_varargs(l);
|
||||
|
||||
int gencomma = !static_flag;
|
||||
|
||||
/* Output each parameter */
|
||||
for (i = 0, p=l; p; i++) {
|
||||
|
||||
/* Ignored varargs */
|
||||
if (checkAttribute(p,"varargs:ignore","1")) {
|
||||
p = nextSibling(p);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignored parameters */
|
||||
if (checkAttribute(p,"tmap:in:numinputs","0")) {
|
||||
p = Getattr(p,"tmap:in:next");
|
||||
|
|
@ -1457,11 +1465,19 @@ class CSHARP : public Language {
|
|||
Swig_typemap_attach_parms("jstype", l, NULL);
|
||||
Swig_typemap_attach_parms("javain", l, NULL);
|
||||
|
||||
emit_mark_varargs(l);
|
||||
|
||||
int gencomma = 0;
|
||||
|
||||
/* Output each parameter */
|
||||
for (i = 0, p=l; p; i++) {
|
||||
|
||||
/* Ignored varargs */
|
||||
if (checkAttribute(p,"varargs:ignore","1")) {
|
||||
p = nextSibling(p);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignored parameters */
|
||||
if (checkAttribute(p,"tmap:in:numinputs","0")) {
|
||||
p = Getattr(p,"tmap:in:next");
|
||||
|
|
@ -2045,7 +2061,7 @@ swig_csharp(void) {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
const char *CSHARP::usage = (char*)"\
|
||||
CSharp Options (available with -csharp)\n\
|
||||
C# Options (available with -csharp)\n\
|
||||
-package <name> - set name of the assembly\n\
|
||||
-noproxy - Generate the low-level functional interface instead of proxy classes\n\
|
||||
\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue