From 198f7adfc44fa89fee84b2404cf51e792a438926 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 4 Nov 2000 06:11:22 +0000 Subject: [PATCH] Added missing string literal const_cast<>s. [SVN r8126] --- subclass.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/subclass.cpp b/subclass.cpp index fce9f06f..af6f3fcd 100644 --- a/subclass.cpp +++ b/subclass.cpp @@ -35,20 +35,20 @@ namespace { // This bit of code copied wholesale from classobject.c in the Python source. PyObject *f, *t, *v, *tb; PyErr_Fetch(&t, &v, &tb); - f = PySys_GetObject("stderr"); + f = PySys_GetObject(const_cast("stderr")); if (f != NULL) { - PyFile_WriteString("Exception ", f); + PyFile_WriteString(const_cast("Exception "), f); if (t) { PyFile_WriteObject(t, f, Py_PRINT_RAW); if (v && v != Py_None) { - PyFile_WriteString(": ", f); + PyFile_WriteString(const_cast(": "), f); PyFile_WriteObject(v, f, 0); } } - PyFile_WriteString(" in ", f); + PyFile_WriteString(const_cast(" in "), f); PyFile_WriteObject(source, f, 0); - PyFile_WriteString(" ignored\n", f); + PyFile_WriteString(const_cast(" ignored\n"), f); PyErr_Clear(); /* Just in case */ } Py_XDECREF(t); @@ -156,7 +156,8 @@ namespace detail { // Mostly copied wholesale from Python's classobject.c PyObject* ClassBase::repr() const { - PyObject *mod = PyDict_GetItemString(m_name_space.get(), "__module__"); + PyObject *mod = PyDict_GetItemString( + m_name_space.get(), const_cast("__module__")); unsigned long address = reinterpret_cast(this); String result = (mod == NULL || !PyString_Check(mod)) ? String("") % Tuple(m_name, address)