Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 193509b

Browse files
committed
Added an attribute runtimemodel, which is either "ppc" or "carbon" and is the runtime model of the current interpreter. Will have to ad another value later for real MacOSX MachO, I guess.
1 parent c3fc51f commit 193509b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Mac/Modules/macosmodule.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,5 +759,14 @@ initMacOS()
759759
if (PyDict_SetItemString(d, "AppearanceCompliant",
760760
Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0)
761761
return;
762+
#if TARGET_API_MAC_CARBON
763+
/* Will need a different name for MachO-carbon later (macho?) */
764+
#define PY_RUNTIMEMODEL "carbon"
765+
#else
766+
#define PY_RUNTIMEMODEL "ppc"
767+
#endif
768+
if (PyDict_SetItemString(d, "runtimemodel",
769+
Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
770+
return;
762771
}
763772

0 commit comments

Comments
 (0)