diff options
Diffstat (limited to 'Mac/Modules/res/resedit.py')
-rw-r--r-- | Mac/Modules/res/resedit.py | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py index c66c0c8eff..ab60b342f3 100644 --- a/Mac/Modules/res/resedit.py +++ b/Mac/Modules/res/resedit.py @@ -1,30 +1,30 @@ -resource_body = """ -char *buf; -int len; -Handle h; - -if (!PyArg_ParseTuple(_args, "s#", &buf, &len)) - return NULL; -h = NewHandle(len); -if ( h == NULL ) { - PyErr_NoMemory(); - return NULL; -} -HLock(h); -memcpy(*h, buf, len); -HUnlock(h); -_res = ResObj_New(h); -return _res; -""" - -f = ManualGenerator("Resource", resource_body) -f.docstring = lambda: """Convert a string to a resource object. - -The created resource object is actually just a handle, -apply AddResource() to write it to a resource file. -See also the Handle() docstring. -""" -functions.append(f) +##resource_body = """ +##char *buf; +##int len; +##Handle h; +## +##if (!PyArg_ParseTuple(_args, "s#", &buf, &len)) +## return NULL; +##h = NewHandle(len); +##if ( h == NULL ) { +## PyErr_NoMemory(); +## return NULL; +##} +##HLock(h); +##memcpy(*h, buf, len); +##HUnlock(h); +##_res = ResObj_New(h); +##return _res; +##""" +## +##f = ManualGenerator("Resource", resource_body) +##f.docstring = lambda: """Convert a string to a resource object. +## +##The created resource object is actually just a handle, +##apply AddResource() to write it to a resource file. +##See also the Handle() docstring. +##""" +##functions.append(f) handle_body = """ char *buf; |