From 9589e93491544e4f2775e7928734851703edeaa1 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 18 Jan 1995 13:52:07 +0000 Subject: Moved some generally useful routines to macglue.c --- Mac/Modules/macosmodule.c | 28 ---------------------------- 1 file changed, 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 */ -- cgit v0.12