From: <pj...@us...> - 2008-11-23 04:15:49
|
Revision: 5608 http://jython.svn.sourceforge.net/jython/?rev=5608&view=rev Author: pjenvey Date: 2008-11-23 04:15:40 +0000 (Sun, 23 Nov 2008) Log Message: ----------- relax struct_time entry types to PyObject, CPython allows non ints here. mostly to get rid of __int__ calls w/ a PyInteger cast refs #1052 Modified Paths: -------------- trunk/jython/src/org/python/modules/time/PyTimeTuple.java Modified: trunk/jython/src/org/python/modules/time/PyTimeTuple.java =================================================================== --- trunk/jython/src/org/python/modules/time/PyTimeTuple.java 2008-11-23 02:36:05 UTC (rev 5607) +++ trunk/jython/src/org/python/modules/time/PyTimeTuple.java 2008-11-23 04:15:40 UTC (rev 5608) @@ -24,7 +24,7 @@ public class PyTimeTuple extends PyTuple { @ExposedGet - public PyInteger tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec, tm_wday, tm_yday, tm_isdst; + public PyObject tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec, tm_wday, tm_yday, tm_isdst; @ExposedGet public final int n_sequence_fields = 9, n_fields = 9, n_unnamed_fields = 0; @@ -33,15 +33,15 @@ PyTimeTuple(PyObject... vals) { super(TYPE, vals); - tm_year = (PyInteger)vals[0].__int__(); - tm_mon = (PyInteger)vals[1].__int__(); - tm_mday = (PyInteger)vals[2].__int__(); - tm_hour = (PyInteger)vals[3].__int__(); - tm_min = (PyInteger)vals[4].__int__(); - tm_sec = (PyInteger)vals[5].__int__();; - tm_wday = (PyInteger)vals[6].__int__();; - tm_yday = (PyInteger)vals[7].__int__();; - tm_isdst =(PyInteger)vals[8].__int__();; + tm_year = vals[0]; + tm_mon = vals[1]; + tm_mday = vals[2]; + tm_hour = vals[3]; + tm_min = vals[4]; + tm_sec = vals[5]; + tm_wday = vals[6]; + tm_yday = vals[7]; + tm_isdst =vals[8]; } @ExposedNew This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |