Commit 02cbf4ae authored by Martin v. Löwis's avatar Martin v. Löwis

More unconsting.

parent f4e6928c
......@@ -40,7 +40,7 @@ bisect_right(PyObject *self, PyObject *args, PyObject *kw)
int lo = 0;
int hi = -1;
int index;
static const char *keywords[] = {"a", "x", "lo", "hi", NULL};
static char *keywords[] = {"a", "x", "lo", "hi", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:bisect_right",
keywords, &list, &item, &lo, &hi))
......@@ -70,7 +70,7 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw)
int lo = 0;
int hi = -1;
int index;
static const char *keywords[] = {"a", "x", "lo", "hi", NULL};
static char *keywords[] = {"a", "x", "lo", "hi", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:insort_right",
keywords, &list, &item, &lo, &hi))
......@@ -137,7 +137,7 @@ bisect_left(PyObject *self, PyObject *args, PyObject *kw)
int lo = 0;
int hi = -1;
int index;
static const char *keywords[] = {"a", "x", "lo", "hi", NULL};
static char *keywords[] = {"a", "x", "lo", "hi", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:bisect_left",
keywords, &list, &item, &lo, &hi))
......@@ -167,7 +167,7 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw)
int lo = 0;
int hi = -1;
int index;
static const char *keywords[] = {"a", "x", "lo", "hi", NULL};
static char *keywords[] = {"a", "x", "lo", "hi", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:insort_left",
keywords, &list, &item, &lo, &hi))
......
This diff is collapsed.
......@@ -291,7 +291,7 @@ Dialect_dealloc(DialectObj *self)
self->ob_type->tp_free((PyObject *)self);
}
static const char *dialect_kws[] = {
static char *dialect_kws[] = {
"dialect",
"delimiter",
"doublequote",
......
......@@ -106,12 +106,6 @@ typedef int Py_ssize_t;
#endif
#endif
#if (PY_VERSION_HEX >= 0x02050000)
#define PY_CONST const /* 2.5 adds const to some API:s */
#else
#define PY_CONST
#endif
#if !defined(Py_RETURN_NONE)
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
......@@ -2192,7 +2186,7 @@ xmlparser(PyObject* _self, PyObject* args, PyObject* kw)
PyObject* target = NULL;
char* encoding = NULL;
static PY_CONST char* kwlist[] = { "target", "encoding", NULL };
static char* kwlist[] = { "target", "encoding", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kw, "|Oz:XMLParser", kwlist,
&target, &encoding))
return NULL;
......
......@@ -45,8 +45,8 @@ PyDoc_STRVAR(MultibyteCodec_StreamReader__doc__,
PyDoc_STRVAR(MultibyteCodec_StreamWriter__doc__,
"I.StreamWriter(stream[, errors]) -> StreamWriter instance");
static const char *codeckwarglist[] = {"input", "errors", NULL};
static const char *streamkwarglist[] = {"stream", "errors", NULL};
static char *codeckwarglist[] = {"input", "errors", NULL};
static char *streamkwarglist[] = {"stream", "errors", NULL};
static PyObject *multibytecodec_encode(MultibyteCodec *,
MultibyteCodec_State *, const Py_UNICODE **, size_t,
......
......@@ -1891,7 +1891,7 @@ delta_new(PyTypeObject *type, PyObject *args, PyObject *kw)
PyObject *y = NULL; /* temp sum of microseconds */
double leftover_us = 0.0;
static const char *keywords[] = {
static char *keywords[] = {
"days", "seconds", "microseconds", "milliseconds",
"minutes", "hours", "weeks", NULL
};
......@@ -2194,7 +2194,7 @@ static PyGetSetDef date_getset[] = {
/* Constructors. */
static const char *date_kws[] = {"year", "month", "day", NULL};
static char *date_kws[] = {"year", "month", "day", NULL};
static PyObject *
date_new(PyTypeObject *type, PyObject *args, PyObject *kw)
......@@ -2448,7 +2448,7 @@ date_strftime(PyDateTime_Date *self, PyObject *args, PyObject *kw)
PyObject *result;
PyObject *format;
PyObject *tuple;
static const char *keywords[] = {"format", NULL};
static char *keywords[] = {"format", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "O!:strftime", keywords,
&PyString_Type, &format))
......@@ -3028,7 +3028,7 @@ static PyGetSetDef time_getset[] = {
* Constructors.
*/
static const char *time_kws[] = {"hour", "minute", "second", "microsecond",
static char *time_kws[] = {"hour", "minute", "second", "microsecond",
"tzinfo", NULL};
static PyObject *
......@@ -3196,7 +3196,7 @@ time_strftime(PyDateTime_Time *self, PyObject *args, PyObject *kw)
PyObject *result;
PyObject *format;
PyObject *tuple;
static const char *keywords[] = {"format", NULL};
static char *keywords[] = {"format", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "O!:strftime", keywords,
&PyString_Type, &format))
......@@ -3548,7 +3548,7 @@ static PyGetSetDef datetime_getset[] = {
* Constructors.
*/
static const char *datetime_kws[] = {
static char *datetime_kws[] = {
"year", "month", "day", "hour", "minute", "second",
"microsecond", "tzinfo", NULL
};
......@@ -3729,7 +3729,7 @@ datetime_now(PyObject *cls, PyObject *args, PyObject *kw)
{
PyObject *self;
PyObject *tzinfo = Py_None;
static const char *keywords[] = {"tz", NULL};
static char *keywords[] = {"tz", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "|O:now", keywords,
&tzinfo))
......@@ -3765,7 +3765,7 @@ datetime_fromtimestamp(PyObject *cls, PyObject *args, PyObject *kw)
PyObject *self;
double timestamp;
PyObject *tzinfo = Py_None;
static const char *keywords[] = {"timestamp", "tz", NULL};
static char *keywords[] = {"timestamp", "tz", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "d|O:fromtimestamp",
keywords, &timestamp, &tzinfo))
......@@ -3843,7 +3843,7 @@ datetime_strptime(PyObject *cls, PyObject *args)
static PyObject *
datetime_combine(PyObject *cls, PyObject *args, PyObject *kw)
{
static const char *keywords[] = {"date", "time", NULL};
static char *keywords[] = {"date", "time", NULL};
PyObject *date;
PyObject *time;
PyObject *result = NULL;
......@@ -4070,7 +4070,7 @@ static PyObject *
datetime_isoformat(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
{
char sep = 'T';
static const char *keywords[] = {"sep", NULL};
static char *keywords[] = {"sep", NULL};
char buffer[100];
char *cp;
PyObject *result;
......@@ -4261,7 +4261,7 @@ datetime_astimezone(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
int offset, none;
PyObject *tzinfo;
static const char *keywords[] = {"tz", NULL};
static char *keywords[] = {"tz", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "O!:astimezone", keywords,
&PyDateTime_TZInfoType, &tzinfo))
......
......@@ -26,7 +26,7 @@ static PyObject *_grouper_create(groupbyobject *, PyObject *);
static PyObject *
groupby_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
static const char *kwargs[] = {"iterable", "key", NULL};
static char *kwargs[] = {"iterable", "key", NULL};
groupbyobject *gbo;
PyObject *it, *keyfunc = Py_None;
......
......@@ -874,7 +874,7 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
int fd, flags = MAP_SHARED, prot = PROT_WRITE | PROT_READ;
int devzero = -1;
int access = (int)ACCESS_DEFAULT;
static const char *keywords[] = {"fileno", "length",
static char *keywords[] = {"fileno", "length",
"flags", "prot",
"access", NULL};
......@@ -992,7 +992,7 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
HANDLE fh = 0;
int access = (access_mode)ACCESS_DEFAULT;
DWORD flProtect, dwDesiredAccess;
static const char *keywords[] = { "fileno", "length",
static char *keywords[] = { "fileno", "length",
"tagname",
"access", NULL };
......
......@@ -2566,7 +2566,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds)
PySocketSockObject *s = (PySocketSockObject *)self;
SOCKET_T fd;
int family = AF_INET, type = SOCK_STREAM, proto = 0;
static const char *keywords[] = {"family", "type", "proto", 0};
static char *keywords[] = {"family", "type", "proto", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds,
"|iii:socket", keywords,
......
Markdown is supported
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