@@ -147,37 +147,6 @@ PyTypeObject GWorld_Type = {
147147/* --------------------- End object type GWorld --------------------- */
148148
149149
150- static PyObject * Qdoffs_NewGWorld (_self , _args )
151- PyObject * _self ;
152- PyObject * _args ;
153- {
154- PyObject * _res = NULL ;
155- QDErr _err ;
156- GWorldPtr offscreenGWorld ;
157- short PixelDepth ;
158- Rect boundsRect ;
159- CTabHandle cTable ;
160- GDHandle aGDevice ;
161- GWorldFlags flags ;
162- if (!PyArg_ParseTuple (_args , "hO&O&O&l" ,
163- & PixelDepth ,
164- PyMac_GetRect , & boundsRect ,
165- OptResObj_Convert , & cTable ,
166- OptResObj_Convert , & aGDevice ,
167- & flags ))
168- return NULL ;
169- _err = NewGWorld (& offscreenGWorld ,
170- PixelDepth ,
171- & boundsRect ,
172- cTable ,
173- aGDevice ,
174- flags );
175- if (_err != noErr ) return PyMac_Error (_err );
176- _res = Py_BuildValue ("O&" ,
177- GWorldObj_New , offscreenGWorld );
178- return _res ;
179- }
180-
181150static PyObject * Qdoffs_LockPixels (_self , _args )
182151 PyObject * _self ;
183152 PyObject * _args ;
@@ -209,37 +178,6 @@ static PyObject *Qdoffs_UnlockPixels(_self, _args)
209178 return _res ;
210179}
211180
212- static PyObject * Qdoffs_UpdateGWorld (_self , _args )
213- PyObject * _self ;
214- PyObject * _args ;
215- {
216- PyObject * _res = NULL ;
217- GWorldFlags _rv ;
218- GWorldPtr offscreenGWorld ;
219- short pixelDepth ;
220- Rect boundsRect ;
221- CTabHandle cTable ;
222- GDHandle aGDevice ;
223- GWorldFlags flags ;
224- if (!PyArg_ParseTuple (_args , "hO&O&O&l" ,
225- & pixelDepth ,
226- PyMac_GetRect , & boundsRect ,
227- OptResObj_Convert , & cTable ,
228- OptResObj_Convert , & aGDevice ,
229- & flags ))
230- return NULL ;
231- _rv = UpdateGWorld (& offscreenGWorld ,
232- pixelDepth ,
233- & boundsRect ,
234- cTable ,
235- aGDevice ,
236- flags );
237- _res = Py_BuildValue ("lO&" ,
238- _rv ,
239- GWorldObj_New , offscreenGWorld );
240- return _res ;
241- }
242-
243181static PyObject * Qdoffs_GetGWorld (_self , _args )
244182 PyObject * _self ;
245183 PyObject * _args ;
@@ -563,14 +501,10 @@ static PyObject *Qdoffs_PutPixMapBytes(_self, _args)
563501}
564502
565503static PyMethodDef Qdoffs_methods [] = {
566- {"NewGWorld" , (PyCFunction )Qdoffs_NewGWorld , 1 ,
567- "(short PixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldPtr offscreenGWorld)" },
568504 {"LockPixels" , (PyCFunction )Qdoffs_LockPixels , 1 ,
569505 "(PixMapHandle pm) -> (Boolean _rv)" },
570506 {"UnlockPixels" , (PyCFunction )Qdoffs_UnlockPixels , 1 ,
571507 "(PixMapHandle pm) -> None" },
572- {"UpdateGWorld" , (PyCFunction )Qdoffs_UpdateGWorld , 1 ,
573- "(short pixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldFlags _rv, GWorldPtr offscreenGWorld)" },
574508 {"GetGWorld" , (PyCFunction )Qdoffs_GetGWorld , 1 ,
575509 "() -> (CGrafPtr port, GDHandle gdh)" },
576510 {"SetGWorld" , (PyCFunction )Qdoffs_SetGWorld , 1 ,
@@ -628,7 +562,7 @@ void initQdoffs()
628562 Qdoffs_Error = PyMac_GetOSErrException ();
629563 if (Qdoffs_Error == NULL ||
630564 PyDict_SetItemString (d , "Error" , Qdoffs_Error ) != 0 )
631- Py_FatalError ( "can't initialize Qdoffs.Error" ) ;
565+ return ;
632566 GWorld_Type .ob_type = & PyType_Type ;
633567 Py_INCREF (& GWorld_Type );
634568 if (PyDict_SetItemString (d , "GWorldType" , (PyObject * )& GWorld_Type ) != 0 )
0 commit comments