[Scipy-svn] r4252 - trunk/scipy/weave
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu May 8 18:47:53 EDT 2008
Author: rkern
Date: 2008-05-08 17:47:52 -0500 (Thu, 08 May 2008)
New Revision: 4252
Modified:
trunk/scipy/weave/common_info.py
Log:
const-correctness patch by Norbet Namec.
Modified: trunk/scipy/weave/common_info.py
===================================================================
--- trunk/scipy/weave/common_info.py 2008-05-08 22:21:48 UTC (rev 4251)
+++ trunk/scipy/weave/common_info.py 2008-05-08 22:47:52 UTC (rev 4252)
@@ -15,7 +15,7 @@
object None = object(Py_None);
}
-char* find_type(PyObject* py_obj)
+const char* find_type(PyObject* py_obj)
{
if(py_obj == NULL) return "C NULL value";
if(PyCallable_Check(py_obj)) return "callable";
@@ -76,13 +76,13 @@
get_variable_support_code = \
"""
-void handle_variable_not_found(char* var_name)
+void handle_variable_not_found(const char* var_name)
{
char msg[500];
sprintf(msg,"Conversion Error: variable '%s' not found in local or global scope.",var_name);
throw_error(PyExc_NameError,msg);
}
-PyObject* get_variable(char* name,PyObject* locals, PyObject* globals)
+PyObject* get_variable(const char* name,PyObject* locals, PyObject* globals)
{
// no checking done for error -- locals and globals should
// already be validated as dictionaries. If var is NULL, the
@@ -101,7 +101,7 @@
py_to_raw_dict_support_code = \
"""
-PyObject* py_to_raw_dict(PyObject* py_obj, char* name)
+PyObject* py_to_raw_dict(PyObject* py_obj, const char* name)
{
// simply check that the value is a valid dictionary pointer.
if(!py_obj || !PyDict_Check(py_obj))
More information about the Scipy-svn
mailing list