Skip to content

Commit

Permalink
Merge pull request #323 from christian-rauch/reset_errno
Browse files Browse the repository at this point in the history
reset errno at the beginning of Python function that check it in the end
  • Loading branch information
christian-rauch authored Mar 26, 2024
2 parents 77a769a + 17d1e86 commit 1110fd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apriltag_pywrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ typedef struct {
static PyObject *
apriltag_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
errno = 0;

bool success = false;

apriltag_py_t* self = (apriltag_py_t*)type->tp_alloc(type, 0);
Expand Down Expand Up @@ -200,6 +202,8 @@ static void apriltag_dealloc(apriltag_py_t* self)
static PyObject* apriltag_detect(apriltag_py_t* self,
PyObject* args)
{
errno = 0;

PyObject* result = NULL;
PyArrayObject* xy_c = NULL;
PyArrayObject* xy_lb_rb_rt_lt = NULL;
Expand Down

0 comments on commit 1110fd6

Please sign in to comment.