summaryrefslogtreecommitdiff
path: root/numpy/core/src/numpyos.c
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-04-30 08:34:41 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-04-30 08:34:41 +0000
commit4c2a9af485cd64335f82dac9756a856da9adee16 (patch)
treedd53ef7c266d7c71a52af2cc025201fe5a771a11 /numpy/core/src/numpyos.c
parent065b457b7e52a26bb3fca919b0fb0f12e1c944d3 (diff)
downloadnumpy-4c2a9af485cd64335f82dac9756a856da9adee16.tar.gz
Compile numpyos.c separately.
Diffstat (limited to 'numpy/core/src/numpyos.c')
-rw-r--r--numpy/core/src/numpyos.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/numpy/core/src/numpyos.c b/numpy/core/src/numpyos.c
index 319b4806d..4d7b70a33 100644
--- a/numpy/core/src/numpyos.c
+++ b/numpy/core/src/numpyos.c
@@ -1,6 +1,12 @@
+#define PY_SSIZE_T_CLEAN
+#include <Python.h>
+
#include <locale.h>
#include <stdio.h>
+#define _MULTIARRAYMODULE
+#define NPY_NO_PREFIX
+#include "numpy/arrayobject.h"
#include "numpy/npy_math.h"
/*
@@ -278,7 +284,7 @@ _fix_ascii_format(char* buf, size_t buflen, int decimal)
* Return value: The pointer to the buffer with the converted string.
*/
#define _ASCII_FORMAT(type, suffix, print_type) \
- static char* \
+ NPY_NO_EXPORT char* \
NumPyOS_ascii_format ## suffix(char *buffer, size_t buf_size, \
const char *format, \
type val, int decimal) \
@@ -416,7 +422,7 @@ NumPyOS_ascii_strncasecmp(const char* s1, const char* s2, size_t len)
*
* Work around bugs in PyOS_ascii_strtod
*/
-static double
+NPY_NO_EXPORT double
NumPyOS_ascii_strtod(const char *s, char** endptr)
{
struct lconv *locale_data = localeconv();
@@ -526,7 +532,7 @@ NumPyOS_ascii_strtod(const char *s, char** endptr)
* * 1 if a number read,
* * EOF if end-of-file met before reading anything.
*/
-static int
+NPY_NO_EXPORT int
NumPyOS_ascii_ftolf(FILE *fp, double *value)
{
char buffer[FLOAT_FORMATBUFLEN + 1];