File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,11 +97,28 @@ def outputFreeIt(self, itselfname):
9797methods = []
9898execfile (INPUTFILE )
9999
100+ # Add a manual routine for converting integer WindowPtr's (as returned by
101+ # various event routines) to a WindowObject.
102+ whichwin_body = """
103+ long ptr;
104+
105+ if ( !PyArg_ParseTuple(_args, "i", &ptr) )
106+ return NULL;
107+ return WinObj_WhichWindow((WindowPtr)ptr);
108+ """
109+
110+ f = ManualGenerator ("WhichWindow" , whichwin_body )
111+ f .docstring = lambda : "Resolve an integer WindowPtr address to a Window object"
112+
113+ functions .append (f )
114+
100115# add the populated lists to the generator groups
101116# (in a different wordl the scan program would generate this)
102117for f in functions : module .add (f )
103118for f in methods : object .add (f )
104119
120+
121+
105122# generate output (open the output file as late as possible)
106123SetOutputFileName (OUTPUTFILE )
107124module .generate ()
You can’t perform that action at this time.
0 commit comments