beefed up varargs test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bd5ed41597
commit
5f909daeb9
1 changed files with 14 additions and 3 deletions
|
|
@ -9,9 +9,20 @@ char *test(const char *fmt, ...) {
|
|||
|
||||
class Foo {
|
||||
public:
|
||||
char *test(const char *fmt, ...) {
|
||||
return (char *) fmt;
|
||||
}
|
||||
char *str;
|
||||
Foo() {
|
||||
str = NULL;
|
||||
}
|
||||
Foo(const char *fmt, ...) {
|
||||
str = new char[strlen(fmt) + 1];
|
||||
strcpy(str, fmt);
|
||||
}
|
||||
~Foo() {
|
||||
delete [] str;
|
||||
}
|
||||
char *test(const char *fmt, ...) {
|
||||
return (char *) fmt;
|
||||
}
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue