mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-02 20:42:30 +03:00
Remove bogus casts.
* Casting a string literal to `char *` and then immediately passing or assigning the result to a `const char *` makes no sense. * There is no need to cast `int` to `Py_ssize_t` as they have the same sign and the latter is at least as wide as the former.
This commit is contained in:
@ -889,7 +889,7 @@ def print_function_wrapper(name, output, export, include):
|
||||
include.write("PyObject * ")
|
||||
include.write("libxml_%s(PyObject *self, PyObject *args);\n" % (name))
|
||||
|
||||
export.write(" { (char *)\"%s\", libxml_%s, METH_VARARGS, NULL },\n" %
|
||||
export.write(" { \"%s\", libxml_%s, METH_VARARGS, NULL },\n" %
|
||||
(name, name))
|
||||
|
||||
if file == "python":
|
||||
@ -926,7 +926,7 @@ def print_function_wrapper(name, output, export, include):
|
||||
name)
|
||||
output.write(" return(NULL);\n")
|
||||
if format != "":
|
||||
output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" %
|
||||
output.write("\n if (!PyArg_ParseTuple(args, \"%s\"%s))\n" %
|
||||
(format, format_args))
|
||||
output.write(" return(NULL);\n")
|
||||
if c_convert != "":
|
||||
|
Reference in New Issue
Block a user