From: <fwi...@us...> - 2006-06-12 01:47:45
|
Revision: 2815 Author: fwierzbicki Date: 2006-06-11 18:47:39 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/jython/?rev=2815&view=rev Log Message: ----------- >From patch 1501807. Thanks to Jeff Norton. Added Paths: ----------- trunk/sandbox/jt/README.txt trunk/sandbox/jt/bool.derived trunk/sandbox/jt/bool.expose Added: trunk/sandbox/jt/README.txt =================================================================== --- trunk/sandbox/jt/README.txt (rev 0) +++ trunk/sandbox/jt/README.txt 2006-06-12 01:47:39 UTC (rev 2815) @@ -0,0 +1,15 @@ +Some classes have generated code to enable their usage within Jython. Each +such file will have a generated section that is created with the gexpose.py +script. For the PyIntger class it is created thus: + + python gexpose.py int.expose ../../jython/src/org/python/core/PyInteger.java + +For each class their is an xxx.expose file describing what should be exposed. + +In addition their is an xxxDerived.java class that is completely generated +with the script gderived.py. For the PyInteger class it is created thus: + + python gderived.py int.derived >../../jython/src/org/python/core/PyIntegerDerived.java + +Note: The above exmples assume that the whole jython trunk is checked out so +that the trunk/sandbox directory is a sibling of the trunk/jython directory. Added: trunk/sandbox/jt/bool.derived =================================================================== --- trunk/sandbox/jt/bool.derived (rev 0) +++ trunk/sandbox/jt/bool.derived 2006-06-12 01:47:39 UTC (rev 2815) @@ -0,0 +1,4 @@ +base_class: PyBoolean +want_dict: true +ctr: +incl: object Added: trunk/sandbox/jt/bool.expose =================================================================== --- trunk/sandbox/jt/bool.expose (rev 0) +++ trunk/sandbox/jt/bool.expose 2006-06-12 01:47:39 UTC (rev 2815) @@ -0,0 +1,14 @@ +# setup +type_name: bool +type_class: PyBoolean +# exposed methods +expose_unary: __abs__ __neg__ __pos__ +expose_binary: __and__ __or__ __xor__ +expose_new_immutable: +expose_meth: :b __nonzero__ +expose_meth: __repr__ + return new PyString(self.bool_toString()); +expose_meth: __str__ + return new PyString(self.bool_toString()); +expose_meth: __hash__ + return Py.newInteger(self.bool_hashCode()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |