Skip to content

Commit 2feb5ed

Browse files
committed
reduce IS_PY3K usage
1 parent c30c15f commit 2feb5ed

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Diff for: _mysql.c

+1-15
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ PERFORMANCE OF THIS SOFTWARE.
5151
#include "errmsg.h"
5252

5353
#define MyAlloc(s,t) (s *) t.tp_alloc(&t,0)
54-
#ifdef IS_PY3K
55-
# define MyFree(o) Py_TYPE(o)->tp_free((PyObject*)o)
56-
#else
57-
# define MyFree(ob) ob->ob_type->tp_free((PyObject *)ob)
58-
#endif
54+
#define MyFree(o) Py_TYPE(o)->tp_free((PyObject*)o)
5955

6056
static PyObject *_mysql_MySQLError;
6157
static PyObject *_mysql_Warning;
@@ -2643,12 +2639,7 @@ _mysql_ResultObject_setattro(
26432639
}
26442640

26452641
PyTypeObject _mysql_ConnectionObject_Type = {
2646-
#ifdef IS_PY3K
26472642
PyVarObject_HEAD_INIT(NULL, 0)
2648-
#else
2649-
PyObject_HEAD_INIT(NULL)
2650-
0,
2651-
#endif
26522643
"_mysql.connection", /* (char *)tp_name For printing */
26532644
sizeof(_mysql_ConnectionObject),
26542645
0,
@@ -2715,12 +2706,7 @@ PyTypeObject _mysql_ConnectionObject_Type = {
27152706
} ;
27162707

27172708
PyTypeObject _mysql_ResultObject_Type = {
2718-
#ifdef IS_PY3K
27192709
PyVarObject_HEAD_INIT(NULL, 0)
2720-
#else
2721-
PyObject_HEAD_INIT(NULL)
2722-
0,
2723-
#endif
27242710
"_mysql.result",
27252711
sizeof(_mysql_ResultObject),
27262712
0,

0 commit comments

Comments
 (0)