Fix SF#2552048. Remove the 'self' parameter in Python proxy code for static member function.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Haoyu Bai 2009-01-31 13:38:39 +00:00
commit be7fdab62e
3 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,9 @@
Version 1.3.38 (in progress)
================================
2008-01-31: bhy
[Python] Fix SF#2552048 reported by Gaetan Lehmann. The parameter list
of static member function in generated proxy code should not have the
'self' parameter.
2008-01-29: wsfulton
Fix regression introduced in 1.3.37 where the default output directory

View file

@ -0,0 +1,7 @@
#!/usr/bin/evn python
from cpp_static import *
StaticFunctionTest.static_func()
StaticFunctionTest.static_func_2(1)
StaticFunctionTest.static_func_3(1,2)
StaticMemberTest.static_int = 10
assert StaticMemberTest.static_int == 10

View file

@ -3159,8 +3159,8 @@ public:
if (shadow) {
if (!classic && !Getattr(n, "feature:python:callback") && have_addtofunc(n)) {
int kw = (check_kwargs(n) && !Getattr(n, "sym:overloaded")) ? 1 : 0;
String *parms = make_pyParmList(n, true, false, kw);
String *callParms = make_pyParmList(n, true, true, kw);
String *parms = make_pyParmList(n, false, false, kw);
String *callParms = make_pyParmList(n, false, true, kw);
Printv(f_shadow, tab4, "def ", symname, "(", parms, ")", returnTypeAnnotation(n), ":\n", NIL);
if (have_docstring(n))
Printv(f_shadow, tab8, docstring(n, AUTODOC_STATICFUNC, tab8), "\n", NIL);