Commits

Denis Bilenko committed cd99f8b

rename handle_error's argument "where" to "context"

  • Participants
  • Parent commits aa127b7

Comments (0)

Files changed (3)

File gevent/callbacks.c

-static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* where) {
+static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context) {
     PyThreadState *tstate;
     PyObject *type, *value, *traceback, *result;
     tstate = PyThreadState_GET();
 
     PyErr_Clear();
 
-    result = ((struct __pyx_vtabstruct_6gevent_4core_loop *)loop->__pyx_vtab)->handle_error(loop, where, type, value, traceback, 0);
+    result = ((struct __pyx_vtabstruct_6gevent_4core_loop *)loop->__pyx_vtab)->handle_error(loop, context, type, value, traceback, 0);
 
     if (result) {
         Py_DECREF(result);

File gevent/callbacks.h

 
 static void gevent_signal_check(struct ev_loop *, void *, int);
 struct PyGeventLoopObject;
-static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* where);
+static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context);
 
 #if defined(_WIN32)
 static void gevent_periodic_signal_check(struct ev_loop *, void *, int);

File gevent/core_.pyx

         def __get__(self):
             return libev.EV_MINPRI
 
-    cpdef handle_error(self, where, type, value, tb):
+    cpdef handle_error(self, context, type, value, tb):
         cdef object handle_error
         cdef object error_handler = self.error_handler
         if error_handler is not None:
             # we do want to do getattr every time so that setting Hub.handle_error property just works
             handle_error = getattr(error_handler, 'handle_error', error_handler)
-            handle_error(where, type, value, tb)
+            handle_error(context, type, value, tb)
         else:
-            self._default_handle_error(where, type, value, tb)
+            self._default_handle_error(context, type, value, tb)
 
-    cpdef _default_handle_error(self, where, type, value, tb):
+    cpdef _default_handle_error(self, context, type, value, tb):
         # note: Hub sets its own error handler so this is not used by gevent
         # this is here to make core.loop usable without the rest of gevent
         import traceback