Commits

Ronald Oussoren committed 8acd744

Fix compilation issue with python < 3.3

Comments (0)

Files changed (2)

pyobjc-core/Modules/objc/method-signature.m

 		}
 #if PY_MAJOR_VERSION == 2
 		else if (PyInt_Check(v)) {
-			methinfo->arrayArg = PyInt_AsLong(v);
+			methinfo->arrayArg = (int)PyInt_AsLong(v);
 		}
 #endif
 	}

pyobjc-core/Modules/objc/objc-class.m

 		}
 
 		name_bytes = name;
-		Py_INCREF(bytes);
+		Py_INCREF(name_bytes);
 #endif
 	} else {
 		PyErr_Format(PyExc_TypeError, "Attribute name is not a string, but an instance of '%s'",