Skip to content

Commit

Permalink
BUG: fix separate compilation (with distutils only for now).
Browse files Browse the repository at this point in the history
  • Loading branch information
cournape committed Jun 24, 2012
1 parent 6bb3ef6 commit 465c2f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion numpy/core/src/multiarray/_datetime.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#ifndef _NPY_PRIVATE__DATETIME_H_
#define _NPY_PRIVATE__DATETIME_H_

#ifdef NPY_ENABLE_SEPARATE_COMPILATION
extern NPY_NO_EXPORT char *_datetime_strings[NPY_DATETIME_NUMUNITS];
extern NPY_NO_EXPORT int _days_per_month_table[2][12];
#else
NPY_NO_EXPORT char *_datetime_strings[NPY_DATETIME_NUMUNITS];

NPY_NO_EXPORT int _days_per_month_table[2][12];
#endif

NPY_NO_EXPORT void
numpy_pydatetime_import();
Expand Down
5 changes: 5 additions & 0 deletions numpy/core/src/multiarray/datetime_busdaycal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ typedef struct {
npy_bool weekmask[7];
} NpyBusDayCalendar;

#ifdef NPY_ENABLE_SEPARATE_COMPILATION
extern NPY_NO_EXPORT PyTypeObject NpyBusDayCalendar_Type;
#else
NPY_NO_EXPORT PyTypeObject NpyBusDayCalendar_Type;
#endif


/*
* Converts a Python input into a 7-element weekmask, where 0 means
Expand Down
10 changes: 8 additions & 2 deletions numpy/core/src/umath/reduction.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
*
* See LICENSE.txt for the license.
*/
#define _UMATHMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION

#define PY_SSIZE_T_CLEAN
#include <Python.h>

#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#include "npy_config.h"
#ifdef ENABLE_SEPARATE_COMPILATION
#define PY_ARRAY_UNIQUE_SYMBOL _npy_umathmodule_ARRAY_API
#define NO_IMPORT_ARRAY
#endif

#include <numpy/arrayobject.h>

#include "npy_config.h"
Expand Down

0 comments on commit 465c2f4

Please sign in to comment.