[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] protected const method wrappers
From: James Emerton <ephelon () gmail ! com>
Date: 2005-04-29 23:17:25
Message-ID: c9424d9405042916177fe331f8 () mail ! gmail ! com
[Download RAW message or body]
When SIP generates the virtual wrapper classes, protected methods get
a public sipProtect_foo() method. These methods do not inherit
const-ness from their corresponding protected method. If you have a
class where the method signature of two protected methods differs only
in that one is const and one is not, the wrapper will fail to compile.
I have created a patch that applies the correct const-ness to the
sipProtect_ member.
James
["gencode.patch" (application/octet-stream)]
--- gencode.c.orig Fri Apr 29 16:07:52 2005
+++ gencode.c Fri Apr 29 16:08:09 2005
@@ -4046,7 +4046,9 @@
prcode(fp," sipProtect_%s(",od -> cppname);
generateArgs(od -> cppsig,Declaration,fp);
- prcode(fp,");\n"
+ /* James added const-ness to sipProtect_* signature */
+ prcode(fp,")%s;\n"
+ ,(isConst(od) ? " const" : "")
);
}
}
@@ -4082,8 +4084,10 @@
prcode(fp,
" sip%C::sipProtect_%s(",classFQCName(cd),mname);
generateArgs(od -> cppsig,Definition,fp);
- prcode(fp,")\n"
+ /* James added const-ness to sipProtect_* signature */
+ prcode(fp,")%s\n"
"{\n"
+ ,( isConst(od) ? " const" : "" )
);
incast = FALSE;
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic