diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1997-09-20 17:40:22 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1997-09-20 17:40:22 (GMT) |
commit | a755e68df647bd3dc27749998d19cc47649a8b4f (patch) | |
tree | 95f40587e6e5befe6a870474fc9a15cc0f3683b1 /Mac/Modules/macosmodule.c | |
parent | 6dd48686810f4806d98eaffa29e53dfabaca2e08 (diff) | |
download | cpython-a755e68df647bd3dc27749998d19cc47649a8b4f.zip cpython-a755e68df647bd3dc27749998d19cc47649a8b4f.tar.gz cpython-a755e68df647bd3dc27749998d19cc47649a8b4f.tar.bz2 |
Export type objects to Python
Diffstat (limited to 'Mac/Modules/macosmodule.c')
-rw-r--r-- | Mac/Modules/macosmodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 1717d39..6fc3cf4 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -278,7 +278,7 @@ static char Rftype__doc__[] = static PyTypeObject Rftype = { PyObject_HEAD_INIT(&PyType_Type) 0, /*ob_size*/ - "Resource fork", /*tp_name*/ + "ResourceFork", /*tp_name*/ sizeof(rfobject), /*tp_basicsize*/ 0, /*tp_itemsize*/ /* methods */ @@ -716,6 +716,10 @@ MacOS_Init() MacOS_Error = PyMac_GetOSErrException(); if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0) Py_FatalError("can't define MacOS.Error"); + Rftype.ob_type = &PyType_Type; + Py_INCREF(&Rftype); + if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0) + Py_FatalError("can't define MacOS.ResourceForkType"); /* ** This is a hack: the following constant added to the id() of a string ** object gives you the address of the data. Unfortunately, it is needed for |