From 4c6e0db076ad1f1c5feaf2c1d238b9fbda0ad6b6 Mon Sep 17 00:00:00 2001 From: "Bradley M. Froehle" Date: Thu, 14 Mar 2013 11:23:16 -0700 Subject: [PATCH] BUG: Avoid exporting symbols in MemoryView utility code. --- Cython/Utility/MemoryView_C.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c index 573995c..3b4e357 100644 --- a/Cython/Utility/MemoryView_C.c +++ b/Cython/Utility/MemoryView_C.c @@ -671,11 +671,11 @@ __pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx, /////////////// MemviewDtypeToObject.proto /////////////// {{if to_py_function}} -PyObject *{{get_function}}(const char *itemp); /* proto */ +static PyObject *{{get_function}}(const char *itemp); /* proto */ {{endif}} {{if from_py_function}} -int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ +static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ {{endif}} /////////////// MemviewDtypeToObject /////////////// @@ -684,13 +684,13 @@ int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ /* Convert a dtype to or from a Python object */ {{if to_py_function}} -PyObject *{{get_function}}(const char *itemp) { +static PyObject *{{get_function}}(const char *itemp) { return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp); } {{endif}} {{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); if ({{error_condition}}) return 0; @@ -701,17 +701,17 @@ int {{set_function}}(const char *itemp, PyObject *obj) { /////////////// MemviewObjectToObject.proto /////////////// /* Function callbacks (for memoryview object) for dtype object */ -PyObject *{{get_function}}(const char *itemp); /* proto */ -int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ +static PyObject *{{get_function}}(const char *itemp); /* proto */ +static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ /////////////// MemviewObjectToObject /////////////// -PyObject *{{get_function}}(const char *itemp) { +static PyObject *{{get_function}}(const char *itemp) { PyObject *result = *(PyObject **) itemp; Py_INCREF(result); return result; } -int {{set_function}}(const char *itemp, PyObject *obj) { +static int {{set_function}}(const char *itemp, PyObject *obj) { Py_INCREF(obj); Py_DECREF(*(PyObject **) itemp); *(PyObject **) itemp = obj; -- 2.7.4