Commit 4c6e0db0 authored by Bradley M. Froehle's avatar Bradley M. Froehle

BUG: Avoid exporting symbols in MemoryView utility code.

parent 1d770737
...@@ -671,11 +671,11 @@ __pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx, ...@@ -671,11 +671,11 @@ __pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx,
/////////////// MemviewDtypeToObject.proto /////////////// /////////////// MemviewDtypeToObject.proto ///////////////
{{if to_py_function}} {{if to_py_function}}
PyObject *{{get_function}}(const char *itemp); /* proto */ static PyObject *{{get_function}}(const char *itemp); /* proto */
{{endif}} {{endif}}
{{if from_py_function}} {{if from_py_function}}
int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */
{{endif}} {{endif}}
/////////////// MemviewDtypeToObject /////////////// /////////////// MemviewDtypeToObject ///////////////
...@@ -684,13 +684,13 @@ int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ ...@@ -684,13 +684,13 @@ int {{set_function}}(const char *itemp, PyObject *obj); /* proto */
/* Convert a dtype to or from a Python object */ /* Convert a dtype to or from a Python object */
{{if to_py_function}} {{if to_py_function}}
PyObject *{{get_function}}(const char *itemp) { static PyObject *{{get_function}}(const char *itemp) {
return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp); return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp);
} }
{{endif}} {{endif}}
{{if from_py_function}} {{if from_py_function}}
int {{set_function}}(const char *itemp, PyObject *obj) { static int {{set_function}}(const char *itemp, PyObject *obj) {
{{dtype}} value = {{from_py_function}}(obj); {{dtype}} value = {{from_py_function}}(obj);
if ({{error_condition}}) if ({{error_condition}})
return 0; return 0;
...@@ -701,17 +701,17 @@ int {{set_function}}(const char *itemp, PyObject *obj) { ...@@ -701,17 +701,17 @@ int {{set_function}}(const char *itemp, PyObject *obj) {
/////////////// MemviewObjectToObject.proto /////////////// /////////////// MemviewObjectToObject.proto ///////////////
/* Function callbacks (for memoryview object) for dtype object */ /* Function callbacks (for memoryview object) for dtype object */
PyObject *{{get_function}}(const char *itemp); /* proto */ static PyObject *{{get_function}}(const char *itemp); /* proto */
int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */
/////////////// MemviewObjectToObject /////////////// /////////////// MemviewObjectToObject ///////////////
PyObject *{{get_function}}(const char *itemp) { static PyObject *{{get_function}}(const char *itemp) {
PyObject *result = *(PyObject **) itemp; PyObject *result = *(PyObject **) itemp;
Py_INCREF(result); Py_INCREF(result);
return result; return result;
} }
int {{set_function}}(const char *itemp, PyObject *obj) { static int {{set_function}}(const char *itemp, PyObject *obj) {
Py_INCREF(obj); Py_INCREF(obj);
Py_DECREF(*(PyObject **) itemp); Py_DECREF(*(PyObject **) itemp);
*(PyObject **) itemp = obj; *(PyObject **) itemp = obj;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment