Mercurial > pytave
diff arrayobjectdefs.h @ 141:4e5a620758fc
Use consistent Octave style for header files
* arrayobjectdefs.h, exceptions.h, octave_to_python.h, python_to_octave.h:
Use Octave style for include guards and block comments. Include external
header files for types used in declarations.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 04 Apr 2016 17:48:33 -0700 |
parents | b12908ffa6df |
children | a3dc9d24ae38 |
line wrap: on
line diff
--- a/arrayobjectdefs.h Mon Apr 04 17:41:15 2016 -0700 +++ b/arrayobjectdefs.h Mon Apr 04 17:48:33 2016 -0700 @@ -20,17 +20,24 @@ */ -/* If your extension does not reside in a single file, there is an - * additional step that is necessary. Be sure to define the symbol - * PY_ARRAY_UNIQUE_SYMBOL to some name (the same name in all the files - * comprising the extension), upstream from the include of - * arrayobject.h. Typically this would be in some header file that is - * included before arrayobject.h. - */ -#ifndef PYTAVE_DO_DECLARE_SYMBOL -#define NO_IMPORT_ARRAY +#if ! defined (pytave_arrayobjectdefs_h) +#define pytave_arrayobjectdefs_h 1 + +// If your extension does not reside in a single file, there is an +// additional step that is necessary. Be sure to define the symbol +// PY_ARRAY_UNIQUE_SYMBOL to some name (the same name in all the files +// comprising the extension), upstream from the include of +// arrayobject.h. Typically this would be in some header file that is +// included before arrayobject.h. + +#if ! defined (PYTAVE_DO_DECLARE_SYMBOL) +# define NO_IMPORT_ARRAY #endif + #define PY_ARRAY_UNIQUE_SYMBOL pytave_array_symbol + #include <Python.h> #include <numpy/npy_no_deprecated_api.h> #include <numpy/arrayobject.h> + +#endif