swig/swig207-setools.patch
Adam Tkac e97a2ab6bd Fix building of setools package
Signed-off-by: Adam Tkac <atkac@redhat.com>
2012-06-27 17:02:03 +02:00

19 lines
868 B
Diff

diff -up swig-2.0.7/Source/Swig/naming.c.setools swig-2.0.7/Source/Swig/naming.c
--- swig-2.0.7/Source/Swig/naming.c.setools 2011-12-11 17:29:51.000000000 +0100
+++ swig-2.0.7/Source/Swig/naming.c 2012-06-27 16:21:21.248375130 +0200
@@ -215,11 +215,11 @@ String *Swig_name_member(const_String_or
Append(r, f);
}
cname = Char(rclassname);
- if ((strncmp(cname, "struct ", 7) == 0) || ((strncmp(cname, "class ", 6) == 0)) || ((strncmp(cname, "union ", 6) == 0))) {
- cname = strchr(cname, ' ') + 1;
- }
replace_nspace(r, nspace);
Replace(r, "%c", cname, DOH_REPLACE_ANY);
+ if ((strncmp(cname, "struct ", 7) == 0) || ((strncmp(cname, "class ", 6) == 0)) || ((strncmp(cname, "union ", 6) == 0))) {
+ Replace(r, " ", "_", DOH_REPLACE_FIRST);
+ }
Replace(r, "%m", membername, DOH_REPLACE_ANY);
/* name_mangle(r); */
Delete(rclassname);