Skip to content

Commit

Permalink
Python has an implementation for ASSIGN, lets use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-hof committed Feb 22, 2017
1 parent f176d89 commit 7f20484
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Acquisition/_Acquisition.c
Expand Up @@ -20,14 +20,7 @@

static ACQUISITIONCAPI AcquisitionCAPI;

static void
PyVar_Assign(PyObject **v, PyObject *e)
{
Py_XDECREF(*v);
*v=e;
}

#define ASSIGN(V,E) PyVar_Assign(&(V),(E))
#define ASSIGN(dst, src) Py_XSETREF(dst, src)
#define OBJECT(O) ((PyObject*)(O))

/* sizeof("x") == 2 because of the '\0' byte. */
Expand Down

0 comments on commit 7f20484

Please sign in to comment.