diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Mac/Modules/res/resedit.py | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/Modules/res/resedit.py')
-rw-r--r-- | Mac/Modules/res/resedit.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py index ab60b34..b3ef790 100644 --- a/Mac/Modules/res/resedit.py +++ b/Mac/Modules/res/resedit.py @@ -4,11 +4,11 @@ ##Handle h; ## ##if (!PyArg_ParseTuple(_args, "s#", &buf, &len)) -## return NULL; +## return NULL; ##h = NewHandle(len); ##if ( h == NULL ) { -## PyErr_NoMemory(); -## return NULL; +## PyErr_NoMemory(); +## return NULL; ##} ##HLock(h); ##memcpy(*h, buf, len); @@ -33,11 +33,11 @@ Handle h; ResourceObject *rv; if (!PyArg_ParseTuple(_args, "s#", &buf, &len)) - return NULL; + return NULL; h = NewHandle(len); if ( h == NULL ) { - PyErr_NoMemory(); - return NULL; + PyErr_NoMemory(); + return NULL; } HLock(h); memcpy(*h, buf, len); @@ -66,10 +66,10 @@ return _res; def genresconverter(longname, shortname): - f = ManualGenerator("as_%s"%longname, as_xxx_body%(shortname, longname)) - docstring = "Return this resource/handle as a %s"%longname - f.docstring = lambda docstring=docstring: docstring - return f + f = ManualGenerator("as_%s"%longname, as_xxx_body%(shortname, longname)) + docstring = "Return this resource/handle as a %s"%longname + f.docstring = lambda docstring=docstring: docstring + return f resmethods.append(genresconverter("Control", "Ctl")) resmethods.append(genresconverter("Menu", "Menu")) @@ -87,13 +87,13 @@ resmethods.append(f) AutoDispose_body = """ int onoff, old = 0; if (!PyArg_ParseTuple(_args, "i", &onoff)) - return NULL; + return NULL; if ( _self->ob_freeit ) - old = 1; + old = 1; if ( onoff ) - _self->ob_freeit = PyMac_AutoDisposeHandle; + _self->ob_freeit = PyMac_AutoDisposeHandle; else - _self->ob_freeit = NULL; + _self->ob_freeit = NULL; _res = Py_BuildValue("i", old); return _res; """ |