1. Ronald Oussoren
  2. pyobjc

Source

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

Diff from to

File pyobjc-core/Modules/objc/fsref.m

 	rc = FSRefMakePath( &((PyObjC_FSRefObject*)ref)->ref,
 			buffer, sizeof(buffer));
 	if (rc != 0) {
-#if PY_MAJOR_VERSION == 2
+#if (PY_MAJOR_VERSION == 2) && defined (USE_TOOLBOX_OBJECT_GLUE)
 		PyMac_Error(rc);
 #else
 		PyErr_Format(PyExc_OSError, "MAC Error %d", rc);
 	rc = FSPathMakeRef((UInt8*)PyBytes_AsString(value), &result, &isDirectory);
 	Py_DECREF(value);
 	if (rc != 0) {
-#if PY_MAJOR_VERSION == 2
+#if (PY_MAJOR_VERSION == 2) && defined(USE_TOOLBOX_OBJECT_GLUE)
 		PyMac_Error(rc);
 #else
 		PyErr_Format(PyExc_OSError, "MAC Error %d", rc);