Commit 2e6243d4 authored by David Gobbi's avatar David Gobbi
Browse files

Remove unnecessary casts for PyDict_SetItemString.

The casts are unecessary for Python 2.5 and higher.
parent 0c75ddd3
......@@ -622,7 +622,7 @@ int main(int argc, char *argv[])
{
fprintf(fp,
" o = PyVTKNamespace_%s();\n"
" if (o && PyDict_SetItemString(dict, (char *)\"%s\", o) != 0)\n"
" if (o && PyDict_SetItemString(dict, \"%s\", o) != 0)\n"
" {\n"
" Py_DECREF(o);\n"
" }\n"
......@@ -666,7 +666,7 @@ int main(int argc, char *argv[])
" }\n"
" if (nt)\n"
" {\n"
" PyDict_SetItemString(dict, (char *)nt, ot);\n"
" PyDict_SetItemString(dict, nt, ot);\n"
" }\n"
" }\n"
" Py_DECREF(l);\n"
......@@ -691,7 +691,7 @@ int main(int argc, char *argv[])
}
fprintf(fp,
" if (o && PyDict_SetItemString(dict, (char *)\"%s\", o) != 0)\n"
" if (o && PyDict_SetItemString(dict, \"%s\", o) != 0)\n"
" {\n"
" Py_DECREF(o);\n"
" }\n"
......
......@@ -197,7 +197,7 @@ void vtkWrapPython_AddConstantHelper(
fprintf(fp,
"%sif (%s)\n"
"%s {\n"
"%s PyDict_SetItemString(%s, (char *)%s%s%s, %s);\n"
"%s PyDict_SetItemString(%s, %s%s%s, %s);\n"
"%s Py_DECREF(%s);\n"
"%s }\n",
indent, objvar, indent, indent, dictvar,
......
Supports Markdown
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