From: <pj...@us...> - 2008-01-01 01:23:19
|
Revision: 3924 http://jython.svn.sourceforge.net/jython/?rev=3924&view=rev Author: pjenvey Date: 2007-12-31 17:23:18 -0800 (Mon, 31 Dec 2007) Log Message: ----------- expose_binary is actually shorthand for how we want these exposed Modified Paths: -------------- trunk/jython/src/org/python/modules/collections/PyDeque.java trunk/jython/src/templates/deque.expose Modified: trunk/jython/src/org/python/modules/collections/PyDeque.java =================================================================== --- trunk/jython/src/org/python/modules/collections/PyDeque.java 2008-01-01 01:12:29 UTC (rev 3923) +++ trunk/jython/src/org/python/modules/collections/PyDeque.java 2008-01-01 01:23:18 UTC (rev 3924) @@ -45,6 +45,120 @@ public static final String exposed_name="deque"; public static void typeSetup(PyObject dict,PyType.Newstyle marker) { + class exposed___eq__ extends PyBuiltinMethodNarrow { + + exposed___eq__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___eq__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___eq__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__eq__",new PyMethodDescr("__eq__",PyDeque.class,1,1,new exposed___eq__(null,null))); + class exposed___ne__ extends PyBuiltinMethodNarrow { + + exposed___ne__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___ne__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___ne__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__ne__",new PyMethodDescr("__ne__",PyDeque.class,1,1,new exposed___ne__(null,null))); + class exposed___lt__ extends PyBuiltinMethodNarrow { + + exposed___lt__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___lt__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___lt__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__lt__",new PyMethodDescr("__lt__",PyDeque.class,1,1,new exposed___lt__(null,null))); + class exposed___le__ extends PyBuiltinMethodNarrow { + + exposed___le__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___le__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___le__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__le__",new PyMethodDescr("__le__",PyDeque.class,1,1,new exposed___le__(null,null))); + class exposed___gt__ extends PyBuiltinMethodNarrow { + + exposed___gt__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___gt__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___gt__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__gt__",new PyMethodDescr("__gt__",PyDeque.class,1,1,new exposed___gt__(null,null))); + class exposed___ge__ extends PyBuiltinMethodNarrow { + + exposed___ge__(PyObject self,PyBuiltinFunction.Info info) { + super(self,info); + } + + public PyBuiltinFunction bind(PyObject self) { + return new exposed___ge__(self,info); + } + + public PyObject __call__(PyObject arg0) { + PyObject ret=((PyDeque)self).deque___ge__(arg0); + if (ret==null) + return Py.NotImplemented; + return ret; + } + + } + dict.__setitem__("__ge__",new PyMethodDescr("__ge__",PyDeque.class,1,1,new exposed___ge__(null,null))); class exposed_append extends PyBuiltinMethodNarrow { exposed_append(PyObject self,PyBuiltinFunction.Info info) { @@ -299,120 +413,6 @@ } dict.__setitem__("__iter__",new PyMethodDescr("__iter__",PyDeque.class,0,0,new exposed___iter__(null,null))); - class exposed___eq__ extends PyBuiltinMethodNarrow { - - exposed___eq__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___eq__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___eq__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__eq__",new PyMethodDescr("__eq__",PyDeque.class,1,1,new exposed___eq__(null,null))); - class exposed___ne__ extends PyBuiltinMethodNarrow { - - exposed___ne__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___ne__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___ne__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__ne__",new PyMethodDescr("__ne__",PyDeque.class,1,1,new exposed___ne__(null,null))); - class exposed___lt__ extends PyBuiltinMethodNarrow { - - exposed___lt__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___lt__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___lt__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__lt__",new PyMethodDescr("__lt__",PyDeque.class,1,1,new exposed___lt__(null,null))); - class exposed___le__ extends PyBuiltinMethodNarrow { - - exposed___le__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___le__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___le__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__le__",new PyMethodDescr("__le__",PyDeque.class,1,1,new exposed___le__(null,null))); - class exposed___gt__ extends PyBuiltinMethodNarrow { - - exposed___gt__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___gt__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___gt__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__gt__",new PyMethodDescr("__gt__",PyDeque.class,1,1,new exposed___gt__(null,null))); - class exposed___ge__ extends PyBuiltinMethodNarrow { - - exposed___ge__(PyObject self,PyBuiltinFunction.Info info) { - super(self,info); - } - - public PyBuiltinFunction bind(PyObject self) { - return new exposed___ge__(self,info); - } - - public PyObject __call__(PyObject arg0) { - PyObject ret=((PyDeque)self).deque___ge__(arg0); - if (ret==null) - return Py.NotImplemented; - return ret; - } - - } - dict.__setitem__("__ge__",new PyMethodDescr("__ge__",PyDeque.class,1,1,new exposed___ge__(null,null))); class exposed___hash__ extends PyBuiltinMethodNarrow { exposed___hash__(PyObject self,PyBuiltinFunction.Info info) { Modified: trunk/jython/src/templates/deque.expose =================================================================== --- trunk/jython/src/templates/deque.expose 2008-01-01 01:12:29 UTC (rev 3923) +++ trunk/jython/src/templates/deque.expose 2008-01-01 01:23:18 UTC (rev 3924) @@ -18,36 +18,7 @@ expose_meth: __repr__ return new PyString(((`typ)self).deque_toString()); expose_meth: __iter__ -expose_meth: __eq__ o - PyObject ret = ((`typ)self).deque___eq__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; -expose_meth: __ne__ o - PyObject ret = ((`typ)self).deque___ne__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; -expose_meth: __lt__ o - PyObject ret = ((`typ)self).deque___lt__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; -expose_meth: __le__ o - PyObject ret = ((`typ)self).deque___le__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; -expose_meth: __gt__ o - PyObject ret = ((`typ)self).deque___gt__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; -expose_meth: __ge__ o - PyObject ret = ((`typ)self).deque___ge__(`arg0); - if (ret == null) - return Py.NotImplemented; - return ret; +expose_binary: __eq__ __ne__ __lt__ __le__ __gt__ __ge__ expose_meth: __hash__ return new PyInteger(((`typ)self).deque_hashCode()); expose_meth: __reduce__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |