mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Whitespace normalization, via reindent.py.
This commit is contained in:
parent
e6ddc8b20b
commit
182b5aca27
453 changed files with 31318 additions and 31452 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue