[C++-sig] Pyste bug - static member functions...
by Roman Sulzhyk other posts by this author
Jun 16 2003 3:43PM messages near this date
[C++-sig] Re: Pyste bug - static member functions...
|
[C++-sig] Re: Pyste bug - static member functions...
Nicodemus:
Another thing I've noticed, that for static member functions the code
generated defines them in class scope instead of global scope, causing
errors.
Basically, you need to change the 'PointerDeclaration' of Method class
to look more like this:
# If a method is static, don't need the class specifier
if self.static:
scope = '*'
else:
scope = '%s::*' % self.class_
if self.const:
const = 'const'
return '(%s (%s)(%s) %s)&%s' % (result, scope, params, const, self.FullNa
me())
That fixes the problem.
I also like Dave's suggestion to use the term 'final' to denote virtual
functions that are not expected to be overloadable from Python.
Thanks!
Roman
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
David Abrahams
David Abrahams
Brett Calcott
Brett Calcott
David Abrahams
Brett Calcott
Brett Calcott
Joel de Guzman
David Abrahams
David Abrahams
Dirk Gerrits
David Abrahams
David Abrahams
Brett Calcott
Joel de Guzman
Nicodemus
David Abrahams
Roman Sulzhyk
David Abrahams
Nicodemus
Roman Sulzhyk
Nicodemus
David Abrahams
Nicodemus
Roman Sulzhyk
Nicodemus
Roman Sulzhyk
Nicodemus
David Abrahams
Nicodemus
Roman Sulzhyk
Ralf W. Grosse-Kunstleve
Nicodemus
|