From: <fwi...@us...> - 2008-10-27 14:54:43
|
Revision: 5518 http://jython.svn.sourceforge.net/jython/?rev=5518&view=rev Author: fwierzbicki Date: 2008-10-27 14:54:38 +0000 (Mon, 27 Oct 2008) Log Message: ----------- Simplifying the fix for http://bugs.jython.org/issue1158 based on the java integration changes in r5516. Mainly, javaProxy now lives directly in PyObject, so there is no need to check for a PyInstance first. Modified Paths: -------------- trunk/jython/src/org/python/core/__builtin__.java Modified: trunk/jython/src/org/python/core/__builtin__.java =================================================================== --- trunk/jython/src/org/python/core/__builtin__.java 2008-10-27 13:19:32 UTC (rev 5517) +++ trunk/jython/src/org/python/core/__builtin__.java 2008-10-27 14:54:38 UTC (rev 5518) @@ -296,15 +296,15 @@ } /** - * @returns modType if obj is a wrapper around an AST modType + * @returns modType if obj is a wrapper around an AST modType else returns + * null * - * XXX: Reaches deep into implementation details -- needs to be reviewed if - * PyInstance is significantly changed. + * XXX: Reaches into implementation details -- needs to be reviewed if our + * java integration changes. */ private static modType py2node(PyObject obj) { - if (obj != null && obj instanceof PyInstance && ((PyInstance)obj).javaProxy - instanceof modType) { - return (modType)((PyInstance)obj).javaProxy; + if (obj != null && obj.javaProxy instanceof modType) { + return (modType)obj.javaProxy; } return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |