summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/menu/menusupport.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/menu/menusupport.py
parente6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff)
downloadcpython-182b5aca27d376b08a2904bed42b751496f932f3.zip
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/Modules/menu/menusupport.py')
-rw-r--r--Mac/Modules/menu/menusupport.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py
index 7c4ae0d..a04b755 100644
--- a/Mac/Modules/menu/menusupport.py
+++ b/Mac/Modules/menu/menusupport.py
@@ -6,17 +6,17 @@
import string
# Declarations that change for each manager
-MACHEADERFILE = 'Menus.h' # The Apple header file
-MODNAME = '_Menu' # The name of the module
-OBJECTNAME = 'Menu' # The basic name of the objects used here
+MACHEADERFILE = 'Menus.h' # The Apple header file
+MODNAME = '_Menu' # The name of the module
+OBJECTNAME = 'Menu' # The basic name of the objects used here
# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Menu' # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Handle' # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj' # The prefix for object methods
+MODPREFIX = 'Menu' # The prefix for module-wide routines
+OBJECTTYPE = OBJECTNAME + 'Handle' # The C type used to represent them
+OBJECTPREFIX = MODPREFIX + 'Obj' # The prefix for object methods
INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
EXTRAFILE = string.lower(MODPREFIX) + 'edit.py' # A similar file but hand-made
-OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
+OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
from macsupport import *
@@ -48,7 +48,7 @@ extern PyObject *_MenuObj_New(MenuHandle);
extern int _MenuObj_Convert(PyObject *, MenuHandle *);
#define MenuObj_New _MenuObj_New
-#define MenuObj_Convert _MenuObj_Convert
+#define MenuObj_Convert _MenuObj_Convert
#endif
#define as_Menu(h) ((MenuHandle)h)
@@ -58,31 +58,31 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *);
/* Alternative version of MenuObj_New, which returns None for NULL argument */
PyObject *OptMenuObj_New(MenuRef itself)
{
- if (itself == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- return MenuObj_New(itself);
+ if (itself == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return MenuObj_New(itself);
}
/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
{
- if ( v == Py_None ) {
- *p_itself = NULL;
- return 1;
- }
- return MenuObj_Convert(v, p_itself);
+ if ( v == Py_None ) {
+ *p_itself = NULL;
+ return 1;
+ }
+ return MenuObj_Convert(v, p_itself);
}
"""
initstuff = initstuff + """
- PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
"""
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
- pass
+ pass
# Create the generator groups and link them
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)