summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/mlte/mltesupport.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
commit182b5aca27d376b08a2904bed42b751496f932f3 (patch)
treedf13115820dbc879c0fe2eae488c9f8c0215a7da /Mac/Modules/mlte/mltesupport.py
parente6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff)
downloadcpython-182b5aca27d376b08a2904bed42b751496f932f3.zip
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/Modules/mlte/mltesupport.py')
-rw-r--r--Mac/Modules/mlte/mltesupport.py67
1 files changed, 33 insertions, 34 deletions
diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py
index 862d0bc..8dcbed5 100644
--- a/Mac/Modules/mlte/mltesupport.py
+++ b/Mac/Modules/mlte/mltesupport.py
@@ -8,12 +8,12 @@
import string
# Declarations that change for each manager
-MODNAME = '_Mlte' # The name of the module
+MODNAME = '_Mlte' # The name of the module
# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Mlte' # The prefix for module-wide routines
+MODPREFIX = 'Mlte' # The prefix for module-wide routines
INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
+OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
from macsupport import *
@@ -43,14 +43,14 @@ static int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
static int
OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
{
- static FSSpec fss;
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- *p_itself = &fss;
- return PyMac_GetFSSpec(v, *p_itself);
+ static FSSpec fss;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ *p_itself = &fss;
+ return PyMac_GetFSSpec(v, *p_itself);
}
/*
@@ -59,15 +59,15 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
static int
OptRectPtr_Convert(PyObject *v, Rect **p_itself)
{
- static Rect r;
-
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- *p_itself = &r;
- return PyMac_GetRect(v, *p_itself);
+ static Rect r;
+
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ *p_itself = &r;
+ return PyMac_GetRect(v, *p_itself);
}
/*
@@ -75,19 +75,19 @@ OptRectPtr_Convert(PyObject *v, Rect **p_itself)
*/
static int
OptGWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
-{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- return GWorldObj_Convert(v, p_itself);
+{
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ return GWorldObj_Convert(v, p_itself);
}
"""
initstuff = initstuff + """
-// PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
+// PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
"""
TXNObject = OpaqueByValueType("TXNObject", "TXNObj")
TXNFontMenuObject = OpaqueByValueType("TXNFontMenuObject", "TXNFontMenuObj")
@@ -133,12 +133,12 @@ execfile("mltetypetest.py")
# Our (opaque) objects
class TXNObjDefinition(PEP253Mixin, GlobalObjectDefinition):
- def outputCheckNewArg(self):
- Output("if (itself == NULL) return PyMac_Error(resNotFound);")
+ def outputCheckNewArg(self):
+ Output("if (itself == NULL) return PyMac_Error(resNotFound);")
class TXNFontMenuObjDefinition(PEP253Mixin, GlobalObjectDefinition):
- def outputCheckNewArg(self):
- Output("if (itself == NULL) return PyMac_Error(resNotFound);")
+ def outputCheckNewArg(self):
+ Output("if (itself == NULL) return PyMac_Error(resNotFound);")
# ADD object class here
@@ -183,7 +183,7 @@ ItemCount iCountDefaultFonts = 0;
TXNInitOptions iUsageFlags;
PyMac_PRECHECK(TXNInitTextension);
if (!PyArg_ParseTuple(_args, "l", &iUsageFlags))
- return NULL;
+ return NULL;
_err = TXNInitTextension(iDefaultFonts,
iCountDefaultFonts,
iUsageFlags);
@@ -200,4 +200,3 @@ module.add(f)
# generate output (open the output file as late as possible)
SetOutputFileName(OUTPUTFILE)
module.generate()
-