[Python-checkins] r78335 - in python/branches/py3k: Modules/timemodule.c Python/errors.c

antoine.pitrou python-checkins at python.org
Mon Feb 22 20:41:37 CET 2010


Author: antoine.pitrou
Date: Mon Feb 22 20:41:37 2010
New Revision: 78335
Log:
Poor PLAN9, it isn't supported
Modified:
 python/branches/py3k/Modules/timemodule.c
 python/branches/py3k/Python/errors.c
Modified: python/branches/py3k/Modules/timemodule.c
==============================================================================
--- python/branches/py3k/Modules/timemodule.c	(original)
+++ python/branches/py3k/Modules/timemodule.c	Mon Feb 22 20:41:37 2010
@@ -1084,22 +1084,6 @@
 		return -1;
 	}
 	Py_END_ALLOW_THREADS
-#elif defined(PLAN9)
-	{
-		double millisecs = secs * 1000.0;
-		if (millisecs > (double)LONG_MAX) {
-			PyErr_SetString(PyExc_OverflowError, "sleep length is too large");
-			return -1;
-		}
-		/* This sleep *CAN BE* interrupted. */
-		Py_BEGIN_ALLOW_THREADS
-		if(sleep((long)millisecs) < 0){
-			Py_BLOCK_THREADS
-			PyErr_SetFromErrno(PyExc_IOError);
-			return -1;
-		}
-		Py_END_ALLOW_THREADS
-	}
 #else
 	/* XXX Can't interrupt this sleep */
 	Py_BEGIN_ALLOW_THREADS
Modified: python/branches/py3k/Python/errors.c
==============================================================================
--- python/branches/py3k/Python/errors.c	(original)
+++ python/branches/py3k/Python/errors.c	Mon Feb 22 20:41:37 2010
@@ -360,25 +360,17 @@
 	PyObject *message;
 	PyObject *v;
 	int i = errno;
-#ifdef PLAN9
-	char errbuf[ERRMAX];
-#else
 #ifndef MS_WINDOWS
 	char *s;
 #else
 	WCHAR *s_buf = NULL;
 #endif /* Unix/Windows */
-#endif /* PLAN 9*/
 
 #ifdef EINTR
 	if (i == EINTR && PyErr_CheckSignals())
 		return NULL;
 #endif
 
-#ifdef PLAN9
-	rerrstr(errbuf, sizeof errbuf);
-	message = PyUnicode_DecodeUTF8(errbuf, strlen(errbuf), "ignore");
-#else
 #ifndef MS_WINDOWS
 	if (i == 0)
 		s = "Error"; /* Sometimes errno didn't get set */
@@ -425,7 +417,6 @@
 		}
 	}
 #endif /* Unix/Windows */
-#endif /* PLAN 9*/
 
 	if (message == NULL)
 	{


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /