Update of /cvsroot/python/python/dist/src/Mac/Modules In directory usw-pr-cvs1:/tmp/cvs-serv21053 Modified Files: macfsmodule.c Log Message: Added as_pathname() method to FSRef objects. Index: macfsmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/macfsmodule.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** macfsmodule.c 2002/01/13 23:16:32 1.52 --- macfsmodule.c 2002/01/18 16:13:15 1.53 *************** *** 774,781 **** } static struct PyMethodDef mfsr_methods[] = { {"as_fsspec", (PyCFunction)mfsr_as_fsspec, 1}, #if 0 - {"as_pathname", (PyCFunction)mfss_as_pathname, 1}, {"as_tuple", (PyCFunction)mfss_as_tuple, 1}, {"NewAlias", (PyCFunction)mfss_NewAlias, 1}, --- 774,797 ---- } + static PyObject * + mfsr_as_pathname(mfsrobject *self, PyObject *args) + { + char strbuf[PATHNAMELEN]; + OSStatus err; + + if (!PyArg_ParseTuple(args, "")) + return NULL; + err = FSRefMakePath(&self->fsref, strbuf, PATHNAMELEN); + if ( err ) { + PyErr_Mac(ErrorObject, err); + return NULL; + } + return PyString_FromString(strbuf); + } + static struct PyMethodDef mfsr_methods[] = { {"as_fsspec", (PyCFunction)mfsr_as_fsspec, 1}, + {"as_pathname", (PyCFunction)mfsr_as_pathname, 1}, #if 0 {"as_tuple", (PyCFunction)mfss_as_tuple, 1}, {"NewAlias", (PyCFunction)mfss_NewAlias, 1},
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4