diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-01-18 13:52:07 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-01-18 13:52:07 (GMT) |
commit | 9589e93491544e4f2775e7928734851703edeaa1 (patch) | |
tree | 8c88a7eacb5b81a535913c0902db3a3ca2bb3e79 /Mac | |
parent | 75b6f1c8e59b9f7737ef104b9391e2b92c911d47 (diff) | |
download | cpython-9589e93491544e4f2775e7928734851703edeaa1.zip cpython-9589e93491544e4f2775e7928734851703edeaa1.tar.gz cpython-9589e93491544e4f2775e7928734851703edeaa1.tar.bz2 |
Moved some generally useful routines to macglue.c
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/macosmodule.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 597d654..344be9a 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -44,34 +44,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. static PyObject *MacOS_Error; /* Exception MacOS.Error */ -/* Convert a ResType argument */ -static int -GetOSType(PyObject *v, ResType *pr) -{ - if (!PyString_Check(v) || PyString_Size(v) != 4) { - PyErr_SetString(MacOS_Error, - "OSType arg must be string of 4 chars"); - return 0; - } - memcpy((char *)pr, PyString_AsString(v), 4); - return 1; -} - -/* Convert a Str255 argument */ -static int -GetStr255(PyObject *v, Str255 pbuf) -{ - int len; - if (!PyString_Check(v) || (len = PyString_Size(v)) > 255) { - PyErr_SetString(MacOS_Error, - "Str255 arg must be string of at most 255 chars"); - return 0; - } - pbuf[0] = len; - memcpy((char *)(pbuf+1), PyString_AsString(v), len); - return 1; -} - /*----------------------------------------------------------------------*/ /* Resource objects */ |