Commits

Anonymous committed 0d60c0d Draft

Improve readability

Comments (0)

Files changed (1)

inotify/_inotify.c

 	if (evt->name != Py_None) {
 		PyObject *pyname = PyObject_Repr(evt->name);
 
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
 		if (pyname != NULL && !PyUnicode_Check(pyname)) {
 			PyObject *unicode_pyname = PyObject_Unicode(pyname);
 			Py_XDECREF(pyname);