Update of /cvsroot/jython/jython/org/python/core
In directory usw-pr-cvs1:/tmp/cvs-serv1661
Modified Files:
PyInstance.java
Log Message:
Part of fix for "[ #462280 ] builtin method as a class variable".
I don't understand the reason for the code I removed with this change. If
there is a performance improvement hidden here, handling both the method
and the function aspect of PyBuiltinFunctionSet in the same way is surely
wrong.
Another hint of the strangeness is the invoke() with zero parameters
which does not check for PyBuiltinFunctionSet. At least now all 3
invoke() methods are working in a similar manner.
Index: PyInstance.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/PyInstance.java,v
retrieving revision 2.25
retrieving revision 2.26
diff -C2 -d -r2.25 -r2.26
*** PyInstance.java 2001/10/28 17:13:43 2.25
--- PyInstance.java 2001/10/30 19:09:23 2.26
***************
*** 250,256 ****
f = ifindclass(name, false);
if (f != null) {
! if (f instanceof PyFunction ||
! f instanceof PyBuiltinFunctionSet)
! {
return f.__call__(this, arg1);
} else {
--- 250,254 ----
f = ifindclass(name, false);
if (f != null) {
! if (f instanceof PyFunction) {
return f.__call__(this, arg1);
} else {
***************
*** 269,275 ****
f = ifindclass(name, false);
if (f != null) {
! if (f instanceof PyFunction ||
! f instanceof PyBuiltinFunctionSet)
! {
return f.__call__(this, arg1, arg2);
} else {
--- 267,271 ----
f = ifindclass(name, false);
if (f != null) {
! if (f instanceof PyFunction) {
return f.__call__(this, arg1, arg2);
} else {
|