Using the __FILE__ macro contaminates the build artifacts with global
build host file system paths. Don't use it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
PyObject_Del(self);
}
-PyObject *_Py_gpiod_SetErrFromErrno(const char *filename)
+PyObject *Py_gpiod_SetErrFromErrno(void)
{
PyObject *exc;
break;
}
- return PyErr_SetFromErrnoWithFilename(exc, filename);
+ return PyErr_SetFromErrno(exc);
}
PyObject *Py_gpiod_GetGlobalType(const char *type_name)
#include <gpiod.h>
#include <Python.h>
-PyObject *_Py_gpiod_SetErrFromErrno(const char *filename);
-#define Py_gpiod_SetErrFromErrno() _Py_gpiod_SetErrFromErrno(__FILE__)
-
+PyObject *Py_gpiod_SetErrFromErrno(void);
PyObject *Py_gpiod_GetGlobalType(const char *type_name);
unsigned int Py_gpiod_PyLongAsUnsignedInt(PyObject *pylong);
void Py_gpiod_dealloc(PyObject *self);