Changeset 7a6521d for python


Ignore:
Timestamp:
Mar 4, 2013, 8:28:17 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
164980f
Parents:
6514bb6
Message:

aubiomodule.c: simplify includes

Location:
python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/aubio-types.h

    r6514bb6 r7a6521d  
    1 #include <Python.h>
     1#include "Python.h"
    22#include <structmember.h>
     3
     4//#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
     5
     6// define numpy unique symbols for aubio
     7#define PY_ARRAY_UNIQUE_SYMBOL PYAUBIO_ARRAY_API
     8#define PY_UFUNC_UNIQUE_SYMBOL PYAUBIO_UFUNC_API
     9
     10// only import array and ufunc from main module
     11#ifndef PY_AUBIO_MODULE_MAIN
    312#define NO_IMPORT_ARRAY
    4 //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    5 #include <numpy/arrayobject.h>
     13#define NO_IMPORT_UFUNC
     14#endif
     15
     16// import aubio
     17#include <numpy/ndarraytypes.h>
     18#include <numpy/ufuncobject.h>
     19#include <numpy/npy_3kcompat.h>
     20
    621#define AUBIO_UNSTABLE 1
    722#include <aubio.h>
    823
    924#define Py_default_vector_length 1024
    10 #define Py_default_vector_height 1
    1125
    1226#define Py_aubio_default_samplerate 44100
  • python/aubiomodule.c

    r6514bb6 r7a6521d  
    1 #include <Python.h>
    2 #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API
    3 //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    4 #include <numpy/arrayobject.h>
    5 
     1#define PY_AUBIO_MODULE_MAIN
    62#include "aubio-types.h"
    73#include "generated/aubio-generated.h"
     
    247243  int err;
    248244
     245  // fvec is defined in __init__.py
    249246  if (   (PyType_Ready (&Py_cvecType) < 0)
    250247      || (PyType_Ready (&Py_filterType) < 0)
     
    282279  PyModule_AddObject (m, "pvoc", (PyObject *) & Py_pvocType);
    283280
    284   // generated objects
     281  // add generated objects
    285282  add_generated_objects(m);
    286283}
Note: See TracChangeset for help on using the changeset viewer.