summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/res/resedit.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-05 23:26:38 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-05 23:26:38 (GMT)
commit5f61a05d7f3a53e627fe14c74b1ba5ecc34eb1de (patch)
tree4fd089257e0d9e777a2f597719d28152083a8835 /Mac/Modules/res/resedit.py
parentdd888a6cff1aaac4663bdbfc777d0472a22985d7 (diff)
downloadcpython-5f61a05d7f3a53e627fe14c74b1ba5ecc34eb1de.zip
cpython-5f61a05d7f3a53e627fe14c74b1ba5ecc34eb1de.tar.gz
cpython-5f61a05d7f3a53e627fe14c74b1ba5ecc34eb1de.tar.bz2
Fixed so the Res.Resource() accepts either another resource, a string
or no argument (giving an empty resource).
Diffstat (limited to 'Mac/Modules/res/resedit.py')
-rw-r--r--Mac/Modules/res/resedit.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py
index c66c0c8..ab60b34 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;