~ubuntu-branches/ubuntu/maverick/pygame/maverick

« back to all changes in this revision

Viewing changes to src/_numericsndarray.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-14 17:02:11 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100114170211-21eop2ja7mr9vdcr
Tags: 1.9.1release-0ubuntu1
* New upstream version (lp: #433304)
* debian/control:
  - build-depends on libportmidi-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
PYGAME_EXPORT
228
228
void init_numericsndarray (void)
229
229
{
230
 
    PyObject *module, *dict;
231
 
    
232
 
    /* create the module */
233
 
    module = Py_InitModule3 ("_numericsndarray", sndarray_builtins,
234
 
        DOC_PYGAMESNDARRAY);
235
 
    dict = PyModule_GetDict (module);
236
 
        
237
 
    /*imported needed apis*/
 
230
    /* imported needed apis; Do this first so if there is an error
 
231
       the module is not loaded.
 
232
    */
238
233
    import_pygame_base ();
 
234
    if (PyErr_Occurred ()) {
 
235
        return;
 
236
    }
239
237
    import_pygame_mixer ();
 
238
    if (PyErr_Occurred ()) {
 
239
        return;
 
240
    }
240
241
    import_array ();
241
 
    /*needed for Numeric in python2.3*/
242
 
    PyImport_ImportModule ("Numeric");
 
242
    if (PyErr_Occurred ()) {
 
243
        return;
 
244
    }
 
245
 
 
246
    /* create the module */
 
247
    Py_InitModule3 ("_numericsndarray", sndarray_builtins, DOC_PYGAMESNDARRAY);
243
248
}