diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 5362584d50e..6d2e133bc7d 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -201,7 +201,7 @@ static void _CallPythonObject(void *mem, } #define CHECK(what, x) \ -if (x == NULL) _AddTraceback(what, __FILE__, __LINE__ - 1), PyErr_Print() +if (x == NULL) _AddTraceback(what, "_ctypes/callbacks.c", __LINE__ - 1), PyErr_Print() result = PyObject_CallObject(callable, arglist); CHECK("'calling callback function'", result); diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 5f20c11286d..07dc219d163 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -766,7 +766,7 @@ static PyObject *GetResult(PyObject *restype, void *result, PyObject *checker) v = PyObject_CallFunctionObjArgs(checker, retval, NULL); if (v == NULL) - _AddTraceback("GetResult", __FILE__, __LINE__-2); + _AddTraceback("GetResult", "_ctypes/callproc.c", __LINE__-2); Py_DECREF(retval); return v; }