172 PyObject*
173 PyImagingNew(Imaging imOut)
174 {
175 ImagingObject* imagep;
176
177 if (!imOut)
when taking True path
178 return NULL;
179
180 imagep = PyObject_New(ImagingObject, &Imaging_Type);
181 if (imagep == NULL) {
182 ImagingDelete(imOut);
183 return NULL;
184 }
185
186 #ifdef VERBOSE
187 printf("imaging %p allocated\n", imagep);
188 #endif
189
190 imagep->image = imOut;
191 imagep->access = ImagingAccessNew(imOut);
192
193 return (PyObject*) imagep;
194 }
returning (PyObject*)NULL without setting an exception