diff --git a/CHANGES.current b/CHANGES.current index 42c47b154..a474e10e1 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -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 diff --git a/Examples/test-suite/python/cpp_static_runme.py b/Examples/test-suite/python/cpp_static_runme.py new file mode 100644 index 000000000..ef8623359 --- /dev/null +++ b/Examples/test-suite/python/cpp_static_runme.py @@ -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 diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index fd4e9be8b..000078524 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -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);