Skip to content

Commit

Permalink
reduce IS_PY3K usage
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jan 4, 2017
1 parent c30c15f commit 2feb5ed
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions _mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "errmsg.h"

#define MyAlloc(s,t) (s *) t.tp_alloc(&t,0)
#ifdef IS_PY3K
# define MyFree(o) Py_TYPE(o)->tp_free((PyObject*)o)
#else
# define MyFree(ob) ob->ob_type->tp_free((PyObject *)ob)
#endif
#define MyFree(o) Py_TYPE(o)->tp_free((PyObject*)o)

static PyObject *_mysql_MySQLError;
static PyObject *_mysql_Warning;
Expand Down Expand Up @@ -2643,12 +2639,7 @@ _mysql_ResultObject_setattro(
}

PyTypeObject _mysql_ConnectionObject_Type = {
#ifdef IS_PY3K
PyVarObject_HEAD_INIT(NULL, 0)
#else
PyObject_HEAD_INIT(NULL)
0,
#endif
"_mysql.connection", /* (char *)tp_name For printing */
sizeof(_mysql_ConnectionObject),
0,
Expand Down Expand Up @@ -2715,12 +2706,7 @@ PyTypeObject _mysql_ConnectionObject_Type = {
} ;

PyTypeObject _mysql_ResultObject_Type = {
#ifdef IS_PY3K
PyVarObject_HEAD_INIT(NULL, 0)
#else
PyObject_HEAD_INIT(NULL)
0,
#endif
"_mysql.result",
sizeof(_mysql_ResultObject),
0,
Expand Down

0 comments on commit 2feb5ed

Please sign in to comment.