From: <pj...@us...> - 2009-10-19 22:04:08
|
Revision: 6875 http://jython.svn.sourceforge.net/jython/?rev=6875&view=rev Author: pjenvey Date: 2009-10-19 22:04:02 +0000 (Mon, 19 Oct 2009) Log Message: ----------- remove the platform hiding functionality, until we actually need it Modified Paths: -------------- trunk/jython/src/org/python/modules/posix/OS.java trunk/jython/src/org/python/modules/posix/PosixModule.java Modified: trunk/jython/src/org/python/modules/posix/OS.java =================================================================== --- trunk/jython/src/org/python/modules/posix/OS.java 2009-10-19 22:02:41 UTC (rev 6874) +++ trunk/jython/src/org/python/modules/posix/OS.java 2009-10-19 22:04:02 UTC (rev 6875) @@ -41,37 +41,6 @@ } /** - * Hide module level functions defined in the PosixModule dict not applicable to this - * OS, identified by the PosixModule.Hide annotation. - * - * @param dict The PosixModule module dict - */ - void hideFunctions(PyObject dict) { - for (Method method: PosixModule.class.getDeclaredMethods()) { - if (isHidden(method)) { - dict.__setitem__(method.getName(), null); - } - } - } - - /** - * Determine if method should be hidden for this OS. - * - * @param method a PosixModule Method - * @return true if should be hidden - */ - private boolean isHidden(Method method) { - if (method.isAnnotationPresent(PosixModule.Hide.class)) { - for (OS os : method.getAnnotation(PosixModule.Hide.class).value()) { - if (os == this) { - return true; - } - } - } - return false; - } - - /** * Return the OS we're running on. */ static OS getOS() { Modified: trunk/jython/src/org/python/modules/posix/PosixModule.java =================================================================== --- trunk/jython/src/org/python/modules/posix/PosixModule.java 2009-10-19 22:02:41 UTC (rev 6874) +++ trunk/jython/src/org/python/modules/posix/PosixModule.java 2009-10-19 22:04:02 UTC (rev 6875) @@ -68,9 +68,6 @@ dict.__setitem__("_posix_impl", Py.java2py(posix)); dict.__setitem__("_native_posix", Py.newBoolean(!(posix instanceof JavaPOSIX))); - // Hide functions not applicable to this platform - os.hideFunctions(dict); - // Hide from Python dict.__setitem__("classDictInit", null); dict.__setitem__("getPOSIX", null); @@ -106,10 +103,4 @@ public static String getOSName() { return os.getModuleName(); } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.METHOD) - @interface Hide { - OS[] value(); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |