another fix to utitle

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-11 23:59:14 +00:00
commit a9137b3f7b
2 changed files with 12 additions and 2 deletions

View file

@ -1,12 +1,20 @@
%module rename_camel
%rename("%(utitle)s",match="cdecl",match$parentNode$nodeType="class") "";
%rename("%(utitle)s",match="cdecl",notmatch$decl="",match$parentNode$nodeType="class") "";
%inline {
struct GeometryFactory
{
void createPointFromInternalCoord(int);
};
class ByteOrderValues {
public:
void readHEX();
static int ENDIAN_BIG;
};
}

View file

@ -197,8 +197,10 @@ String *Swig_string_utitle(String *s) {
while ((c = Getc(s)) != EOF) {
if (isupper(c)) {
if (first) Putc('_',ns);
first = 0;
} else {
first = 1;
}
first = 1;
Putc(tolower(c),ns);
}
return ns;