[Python-checkins] cpython: faulthandler: fix variable name, timeout_ms => timeout_us

victor.stinner python-checkins at python.org
Fri Apr 8 13:40:08 CEST 2011


http://hg.python.org/cpython/rev/0c39e067f35a
changeset:   69207:0c39e067f35a
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Fri Apr 08 13:00:31 2011 +0200
summary:
  faulthandler: fix variable name, timeout_ms => timeout_us

The comment was already correct.

files:
  Modules/faulthandler.c |  12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -46,7 +46,7 @@
 static struct {
     PyObject *file;
     int fd;
-    PY_TIMEOUT_T timeout_ms;   /* timeout in microseconds */
+    PY_TIMEOUT_T timeout_us;   /* timeout in microseconds */
     int repeat;
     PyInterpreterState *interp;
     int exit;
@@ -413,7 +413,7 @@
 
     do {
         st = PyThread_acquire_lock_timed(thread.cancel_event,
-                                         thread.timeout_ms, 0);
+                                         thread.timeout_us, 0);
         if (st == PY_LOCK_ACQUIRED) {
             PyThread_release_lock(thread.cancel_event);
             break;
@@ -457,7 +457,7 @@
 {
     static char *kwlist[] = {"timeout", "repeat", "file", "exit", NULL};
     double timeout;
-    PY_TIMEOUT_T timeout_ms;
+    PY_TIMEOUT_T timeout_us;
     int repeat = 0;
     PyObject *file = NULL;
     int fd;
@@ -473,8 +473,8 @@
         PyErr_SetString(PyExc_OverflowError,  "timeout value is too large");
         return NULL;
     }
-    timeout_ms = (PY_TIMEOUT_T)timeout;
-    if (timeout_ms <= 0) {
+    timeout_us = (PY_TIMEOUT_T)timeout;
+    if (timeout_us <= 0) {
         PyErr_SetString(PyExc_ValueError, "timeout must be greater than 0");
         return NULL;
     }
@@ -497,7 +497,7 @@
     Py_INCREF(file);
     thread.file = file;
     thread.fd = fd;
-    thread.timeout_ms = timeout_ms;
+    thread.timeout_us = timeout_us;
     thread.repeat = repeat;
     thread.interp = tstate->interp;
     thread.exit = exit;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list