Applied Olly's patch for protoTypes, which could

previously segfault due to a wrong Printf.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9792 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-08 10:27:02 +00:00
commit 6acae8cb76

View file

@ -807,6 +807,19 @@ public:
} else {
Swig_arg_error();
}
}
else if (strcmp(argv[i], "-feature") == 0) {
fprintf( stderr, "Warning: Ruby -feature directive is deprecated, please use "
"-init_name instead.");
if (argv[i + 1]) {
char *name = argv[i + 1];
feature = NewString(name);
Swig_mark_arg(i);
Swig_mark_arg(i + 1);
i++;
} else {
Swig_arg_error();
}
} else if (strcmp(argv[i], "-globalmodule") == 0) {
useGlobalModule = true;
Swig_mark_arg(i);
@ -2028,7 +2041,7 @@ public:
Append( protoTypes, "(" );
while(p)
{
Printf(protoTypes, "%s %s", SwigType_str(Getattr(p,"type"), Getattr(p,"name")) );
Append( protoTypes, SwigType_str(Getattr(p,"type"), Getattr(p,"name")) );
if ( ( p = nextSibling(p)) ) Append(protoTypes, ", ");
}
Append( protoTypes, ")\\n\"" );