Only change _get and _set at the end of the method name (fixes bug #1545078)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9346 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
af038c7126
commit
4b6ccd8bbd
1 changed files with 13 additions and 2 deletions
|
|
@ -703,8 +703,19 @@ public:
|
|||
break;
|
||||
case MEMBER_VAR:
|
||||
Append(temp,iname);
|
||||
Replaceall(temp,"_set", "=");
|
||||
Replaceall(temp,"_get", "");
|
||||
/* Check for _set or _get at the end of the name. */
|
||||
if (Len(temp) > 4) {
|
||||
Printf(stdout, "[%s] temp\n", temp);
|
||||
const char *p = Char(temp) + (Len(temp) - 4);
|
||||
Printf(stdout, "[%s] p\n", p);
|
||||
if (strcmp(p, "_set") == 0) {
|
||||
Delslice(temp, Len(temp) - 4, DOH_END);
|
||||
Append(temp, "=");
|
||||
} else if (strcmp(p, "_get") == 0) {
|
||||
Delslice(temp, Len(temp) - 4, DOH_END);
|
||||
}
|
||||
Printf(stdout, "[%s] temp after\n", temp);
|
||||
}
|
||||
if (multipleInheritance) {
|
||||
Printv(klass->init, tab4, "rb_define_method(", klass->mImpl, ", \"",
|
||||
temp, "\", ", wname, ", -1);\n", NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue