]> granicus.if.org Git - python/commitdiff
Revert backwards-incompatible const changes.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 27 Feb 2006 16:46:16 +0000 (16:46 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 27 Feb 2006 16:46:16 +0000 (16:46 +0000)
36 files changed:
Include/modsupport.h
Include/object.h
Modules/_cursesmodule.c
Modules/_hashopenssl.c
Modules/_lsprof.c
Modules/_sre.c
Modules/binascii.c
Modules/bz2module.c
Modules/cPickle.c
Modules/nismodule.c
Modules/pyexpat.c
Modules/sha256module.c
Modules/sha512module.c
Modules/shamodule.c
Objects/abstract.c
Objects/boolobject.c
Objects/classobject.c
Objects/complexobject.c
Objects/descrobject.c
Objects/enumobject.c
Objects/fileobject.c
Objects/floatobject.c
Objects/funcobject.c
Objects/intobject.c
Objects/listobject.c
Objects/longobject.c
Objects/moduleobject.c
Objects/object.c
Objects/stringobject.c
Objects/structseq.c
Objects/tupleobject.c
Objects/typeobject.c
Objects/unicodeobject.c
Objects/weakrefobject.c
Python/bltinmodule.c
Python/getargs.c

index fc9f2e88894c27f7c4cca047497f9c76f788737a..a56d07cf12c38fa3c71ee7bb7eaa6e4547a6a245 100644 (file)
@@ -24,14 +24,14 @@ extern "C" {
 PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
 PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...);
 PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
-                                                  const char *, const char **, ...);
+                                                  const char *, char **, ...);
 PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, int, int, ...);
 PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...);
 PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kw);
 
 PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list);
 PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *,
-                                                  const char *, const char **, va_list);
+                                                  const char *, char **, va_list);
 PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list);
 
 PyAPI_FUNC(int) PyModule_AddObject(PyObject *, const char *, PyObject *);
index 33b75bec691efc9d623ccaf0de051379ce48118a..9c91373115d506f99d376000063d6547506ecefd 100644 (file)
@@ -144,12 +144,12 @@ typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *);
 typedef int (*getreadbufferproc)(PyObject *, int, void **);
 typedef int (*getwritebufferproc)(PyObject *, int, void **);
 typedef int (*getsegcountproc)(PyObject *, int *);
-typedef int (*getcharbufferproc)(PyObject *, int, const char **);
+typedef int (*getcharbufferproc)(PyObject *, int, char **);
 /* ssize_t-based buffer interface */
 typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **);
 typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **);
 typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *);
-typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, const char **);
+typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **);
 
 typedef int (*objobjproc)(PyObject *, PyObject *);
 typedef int (*visitproc)(PyObject *, void *);
@@ -239,9 +239,9 @@ typedef struct {
 typedef void (*freefunc)(void *);
 typedef void (*destructor)(PyObject *);
 typedef int (*printfunc)(PyObject *, FILE *, int);
-typedef PyObject *(*getattrfunc)(PyObject *, const char *);
+typedef PyObject *(*getattrfunc)(PyObject *, char *);
 typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
-typedef int (*setattrfunc)(PyObject *, const char *, PyObject *);
+typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
 typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
 typedef int (*cmpfunc)(PyObject *, PyObject *);
 typedef PyObject *(*reprfunc)(PyObject *);
index 4c03602d5652cccf8648d2f95517d39061d0d187..71d7a696c3ca656cb3f396674a7fa2614b10e365 100644 (file)
@@ -1886,7 +1886,7 @@ PyCurses_setupterm(PyObject* self, PyObject *args, PyObject* keywds)
        int err;
        char* termstr = NULL;
 
-       static const char *kwlist[] = {"term", "fd", NULL};
+       static char *kwlist[] = {"term", "fd", NULL};
 
        if (!PyArg_ParseTupleAndKeywords(
                args, keywds, "|zi:setupterm", kwlist, &termstr, &fd)) {
index 9bdd274e43e7a9278b45d46ad8e2cf6f83e68f0d..117cc4d4f351723235993f9c9fbc6c94fd497548 100644 (file)
@@ -234,7 +234,7 @@ EVP_repr(PyObject *self)
 static int
 EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
 {
-    static const char *kwlist[] = {"name", "string", NULL};
+    static char *kwlist[] = {"name", "string", NULL};
     PyObject *name_obj = NULL;
     char *nameStr;
     unsigned char *cp = NULL;
@@ -370,7 +370,7 @@ The MD5 and SHA1 algorithms are always supported.\n");
 static PyObject *
 EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"name", "string", NULL};
+    static char *kwlist[] = {"name", "string", NULL};
     PyObject *name_obj = NULL;
     char *name;
     const EVP_MD *digest;
index 8b74e388815ff5e7def31e545b4223c11bff26b2..8ffdf238a11c5a30b1b347ba4099728d8ab8494f 100644 (file)
@@ -675,7 +675,7 @@ profiler_enable(ProfilerObject *self, PyObject *args, PyObject *kwds)
 {
        int subcalls = -1;
         int builtins = -1;
-       static const char *kwlist[] = {"subcalls", "builtins", 0};
+       static char *kwlist[] = {"subcalls", "builtins", 0};
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "|ii:enable",
                                         kwlist, &subcalls, &builtins))
                return NULL;
@@ -758,7 +758,7 @@ profiler_init(ProfilerObject *pObj, PyObject *args, PyObject *kw)
 #else
        int builtins = 0;
 #endif
-       static const char *kwlist[] = {"timer", "timeunit",
+       static char *kwlist[] = {"timer", "timeunit",
                                       "subcalls", "builtins", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kw, "|Odii:Profiler", kwlist,
index 3cc90d4860fb7ae6f7361d56e50f9bf5200a8296..fb73f7fbd6bfde0939a086853fbb492510a0bcec 100644 (file)
@@ -2010,7 +2010,7 @@ pattern_match(PatternObject* self, PyObject* args, PyObject* kw)
     PyObject* string;
     int start = 0;
     int end = INT_MAX;
-    static const char* kwlist[] = { "pattern", "pos", "endpos", NULL };
+    static char* kwlist[] = { "pattern", "pos", "endpos", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:match", kwlist,
                                      &string, &start, &end))
         return NULL;
@@ -2047,7 +2047,7 @@ pattern_search(PatternObject* self, PyObject* args, PyObject* kw)
     PyObject* string;
     int start = 0;
     int end = INT_MAX;
-    static const char* kwlist[] = { "pattern", "pos", "endpos", NULL };
+    static char* kwlist[] = { "pattern", "pos", "endpos", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:search", kwlist,
                                      &string, &start, &end))
         return NULL;
@@ -2188,7 +2188,7 @@ pattern_findall(PatternObject* self, PyObject* args, PyObject* kw)
     PyObject* string;
     int start = 0;
     int end = INT_MAX;
-    static const char* kwlist[] = { "source", "pos", "endpos", NULL };
+    static char* kwlist[] = { "source", "pos", "endpos", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:findall", kwlist,
                                      &string, &start, &end))
         return NULL;
@@ -2314,7 +2314,7 @@ pattern_split(PatternObject* self, PyObject* args, PyObject* kw)
 
     PyObject* string;
     int maxsplit = 0;
-    static const char* kwlist[] = { "source", "maxsplit", NULL };
+    static char* kwlist[] = { "source", "maxsplit", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "O|i:split", kwlist,
                                      &string, &maxsplit))
         return NULL;
@@ -2598,7 +2598,7 @@ pattern_sub(PatternObject* self, PyObject* args, PyObject* kw)
     PyObject* template;
     PyObject* string;
     int count = 0;
-    static const char* kwlist[] = { "repl", "string", "count", NULL };
+    static char* kwlist[] = { "repl", "string", "count", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:sub", kwlist,
                                      &template, &string, &count))
         return NULL;
@@ -2612,7 +2612,7 @@ pattern_subn(PatternObject* self, PyObject* args, PyObject* kw)
     PyObject* template;
     PyObject* string;
     int count = 0;
-    static const char* kwlist[] = { "repl", "string", "count", NULL };
+    static char* kwlist[] = { "repl", "string", "count", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:subn", kwlist,
                                      &template, &string, &count))
         return NULL;
@@ -2919,7 +2919,7 @@ match_groups(MatchObject* self, PyObject* args, PyObject* kw)
     int index;
 
     PyObject* def = Py_None;
-    static const char* kwlist[] = { "default", NULL };
+    static char* kwlist[] = { "default", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def))
         return NULL;
 
@@ -2948,7 +2948,7 @@ match_groupdict(MatchObject* self, PyObject* args, PyObject* kw)
     int index;
 
     PyObject* def = Py_None;
-    static const char* kwlist[] = { "default", NULL };
+    static char* kwlist[] = { "default", NULL };
     if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groupdict", kwlist, &def))
         return NULL;
 
index 4a2c268f2b9170af378eda9939063ba9926ba550..3b9a44fa61191584e83df64df0d307e864103b5c 100644 (file)
@@ -1032,7 +1032,7 @@ binascii_a2b_qp(PyObject *self, PyObject *args, PyObject *kwargs)
        unsigned char *data, *odata;
        unsigned int datalen = 0;
        PyObject *rv;
-       static const char *kwlist[] = {"data", "header", NULL};
+       static char *kwlist[] = {"data", "header", NULL};
        int header = 0;
 
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|i", kwlist, &data,
@@ -1133,7 +1133,7 @@ binascii_b2a_qp (PyObject *self, PyObject *args, PyObject *kwargs)
        unsigned int datalen = 0, odatalen = 0;
        PyObject *rv;
        unsigned int linelen = 0;
-       static const char *kwlist[] = {"data", "quotetabs", "istext",
+       static char *kwlist[] = {"data", "quotetabs", "istext",
                                        "header", NULL};
        int istext = 1;
        int quotetabs = 0;
index c8fab7a59b0ce92a791c1a936d80565da3e2e2c8..ed329b8a0f016b61de154e69e7f84a61774d8117 100644 (file)
@@ -1275,7 +1275,7 @@ static PyMemberDef BZ2File_members[] = {
 static int
 BZ2File_init(BZ2FileObject *self, PyObject *args, PyObject *kwargs)
 {
-       static const char *kwlist[] = {"filename", "mode", "buffering",
+       static char *kwlist[] = {"filename", "mode", "buffering",
                                        "compresslevel", 0};
        PyObject *name;
        char *mode = "r";
@@ -1664,7 +1664,7 @@ BZ2Comp_init(BZ2CompObject *self, PyObject *args, PyObject *kwargs)
 {
        int compresslevel = 9;
        int bzerror;
-       static const char *kwlist[] = {"compresslevel", 0};
+       static char *kwlist[] = {"compresslevel", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:BZ2Compressor",
                                         kwlist, &compresslevel))
@@ -2009,7 +2009,7 @@ bz2_compress(PyObject *self, PyObject *args, PyObject *kwargs)
        bz_stream _bzs;
        bz_stream *bzs = &_bzs;
        int bzerror;
-       static const char *kwlist[] = {"data", "compresslevel", 0};
+       static char *kwlist[] = {"data", "compresslevel", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|i",
                                         kwlist, &data, &datasize,
index cb14627de90eebb77252d704a410707ba8b6756a..727dcc946d76cd37d76ff04125b84e8ed916dbb1 100644 (file)
@@ -2868,7 +2868,7 @@ newPicklerobject(PyObject *file, int proto)
 static PyObject *
 get_Pickler(PyObject *self, PyObject *args, PyObject *kwds)
 {
-       static const char *kwlist[] = {"file", "protocol", NULL};
+       static char *kwlist[] = {"file", "protocol", NULL};
        PyObject *file = NULL;
        int proto = 0;
 
@@ -5388,7 +5388,7 @@ Unpickler_setattr(Unpicklerobject *self, char *name, PyObject *value)
 static PyObject *
 cpm_dump(PyObject *self, PyObject *args, PyObject *kwds)
 {
-       static const char *kwlist[] = {"obj", "file", "protocol", NULL};
+       static char *kwlist[] = {"obj", "file", "protocol", NULL};
        PyObject *ob, *file, *res = NULL;
        Picklerobject *pickler = 0;
        int proto = 0;
@@ -5417,7 +5417,7 @@ cpm_dump(PyObject *self, PyObject *args, PyObject *kwds)
 static PyObject *
 cpm_dumps(PyObject *self, PyObject *args, PyObject *kwds)
 {
-       static const char *kwlist[] = {"obj", "protocol", NULL};
+       static char *kwlist[] = {"obj", "protocol", NULL};
        PyObject *ob, *file = 0, *res = NULL;
        Picklerobject *pickler = 0;
        int proto = 0;
index 084852f676a8244f95e82f4a3d3cc93da0a4c47d..0811430cf03fe605077eabfd95f8c0833728b791 100644 (file)
@@ -160,7 +160,7 @@ nis_match (PyObject *self, PyObject *args, PyObject *kwdict)
        int err;
        PyObject *res;
        int fix;
-       static const char *kwlist[] = {"key", "map", "domain", NULL};
+       static char *kwlist[] = {"key", "map", "domain", NULL};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwdict,
                                         "t#s|s:match", kwlist,
@@ -192,7 +192,7 @@ nis_cat (PyObject *self, PyObject *args, PyObject *kwdict)
        struct ypcallback_data data;
        PyObject *dict;
        int err;
-       static const char *kwlist[] = {"map", "domain", NULL};
+       static char *kwlist[] = {"map", "domain", NULL};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwdict, "s|s:cat",
                                         kwlist, &map, &domain))
@@ -383,7 +383,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict)
        nismaplist *maps;
        PyObject *list;
         int err;
-       static const char *kwlist[] = {"domain", NULL};
+       static char *kwlist[] = {"domain", NULL};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwdict,
                                         "|s:maps", kwlist, &domain))
index 76b7cf9ba0f0bc2898830c94530a7629534e3e57..b3001eaef75a70e202c46dda5a4fc6bcbe05d173 100644 (file)
@@ -1726,7 +1726,7 @@ pyexpat_ParserCreate(PyObject *notused, PyObject *args, PyObject *kw)
     PyObject *intern = NULL;
     PyObject *result;
     int intern_decref = 0;
-    static const char *kwlist[] = {"encoding", "namespace_separator",
+    static char *kwlist[] = {"encoding", "namespace_separator",
                                    "intern", NULL};
 
     if (!PyArg_ParseTupleAndKeywords(args, kw, "|zzO:ParserCreate", kwlist,
index e16338dc9e3ec76bd4da5511005706bd126a1073..7037ca0f58d3e17f95a3e2eb88d022e54244db47 100644 (file)
@@ -624,7 +624,7 @@ PyDoc_STRVAR(SHA256_new__doc__,
 static PyObject *
 SHA256_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"string", NULL};
+    static char *kwlist[] = {"string", NULL};
     SHAobject *new;
     unsigned char *cp = NULL;
     int len;
@@ -655,7 +655,7 @@ PyDoc_STRVAR(SHA224_new__doc__,
 static PyObject *
 SHA224_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"string", NULL};
+    static char *kwlist[] = {"string", NULL};
     SHAobject *new;
     unsigned char *cp = NULL;
     int len;
index 3837795964fa9b9c46532b88d695a75efaf42a8b..539204e9c0d24bda63e110b246c9fcbc9fcddb24 100644 (file)
@@ -690,7 +690,7 @@ PyDoc_STRVAR(SHA512_new__doc__,
 static PyObject *
 SHA512_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"string", NULL};
+    static char *kwlist[] = {"string", NULL};
     SHAobject *new;
     unsigned char *cp = NULL;
     int len;
@@ -721,7 +721,7 @@ PyDoc_STRVAR(SHA384_new__doc__,
 static PyObject *
 SHA384_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"string", NULL};
+    static char *kwlist[] = {"string", NULL};
     SHAobject *new;
     unsigned char *cp = NULL;
     int len;
index 93a9224b2aecaabc1438489f3560d1faf1769a51..058391d565f61e543b521d690a95dc1bd0d5cf98 100644 (file)
@@ -543,7 +543,7 @@ hashed.");
 static PyObject *
 SHA_new(PyObject *self, PyObject *args, PyObject *kwdict)
 {
-    static const char *kwlist[] = {"string", NULL};
+    static char *kwlist[] = {"string", NULL};
     SHAobject *new;
     unsigned char *cp = NULL;
     int len;
index a7cc0d65340cebb36ec59cf5c7a6074f866c1ca6..dc46193e5cb9d13ee49390ae4bf0c15836f073f1 100644 (file)
@@ -221,7 +221,7 @@ int PyObject_AsCharBuffer(PyObject *obj,
                          Py_ssize_t *buffer_len)
 {
        PyBufferProcs *pb;
-       const char *pp;
+       char *pp;
        Py_ssize_t len;
 
        if (obj == NULL || buffer == NULL || buffer_len == NULL) {
index 677a98ba2e0766b06f62d94fb5e111070de2a427..f2429fe9b2ccc06abcbae2beca97628b8b9e111b 100644 (file)
@@ -50,7 +50,7 @@ PyObject *PyBool_FromLong(long ok)
 static PyObject *
 bool_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-       static const char *kwlist[] = {"x", 0};
+       static char *kwlist[] = {"x", 0};
        PyObject *x = Py_False;
        long ok;
 
index 9a36f7d15de1847942a2b5da0dc9771d9b2c654c..34afb9ef0fb985c72326cc78425a0058addb2891 100644 (file)
@@ -159,7 +159,7 @@ static PyObject *
 class_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *name, *bases, *dict;
-       static const char *kwlist[] = {"name", "bases", "dict", 0};
+       static char *kwlist[] = {"name", "bases", "dict", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "SOO", kwlist,
                                         &name, &bases, &dict))
index f29a90f1ad22c3e6316b6fa013ca91223a80a93c..5c84eff1db265c5f28bf79d7e5698f61660afde8 100644 (file)
@@ -829,7 +829,7 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
        Py_complex cr, ci;
        int own_r = 0;
        static PyObject *complexstr;
-       static const char *kwlist[] = {"real", "imag", 0};
+       static char *kwlist[] = {"real", "imag", 0};
 
        r = Py_False;
        i = NULL;
index 6972a69218fc09db2c438a2ffdd55f83c6563f4f..b96ad6e7e65c1f94a3fd3c74210325915e24e241 100644 (file)
@@ -1182,7 +1182,7 @@ static int
 property_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
        PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
-       static const char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
+       static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
        propertyobject *gs = (propertyobject *)self;
 
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
index ea85e3c7480aee192507731e940ec7980478f3fa..5999ae9bbdea291e6ea8dbff3c8b9fbc49ba1250 100644 (file)
@@ -16,7 +16,7 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        enumobject *en;
        PyObject *seq = NULL;
-       static const char *kwlist[] = {"sequence", 0};
+       static char *kwlist[] = {"sequence", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:enumerate", kwlist,
                                         &seq))
index e4fffdd52fa1a1e430a53aec5ed3481d41bc737a..d5358692c2968790148e4aca736c089a47e15100 100644 (file)
@@ -1925,7 +1925,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
        PyFileObject *foself = (PyFileObject *)self;
        int ret = 0;
-       static const char *kwlist[] = {"name", "mode", "buffering", 0};
+       static char *kwlist[] = {"name", "mode", "buffering", 0};
        char *name = NULL;
        char *mode = "r";
        int bufsize = -1;
index e1e063b2d539b6f2d30384e4b8f7bb8d83cfbd16..bc19a5b7b9c8f50d222dcf244cf2a2b6914ddf35 100644 (file)
@@ -940,7 +940,7 @@ static PyObject *
 float_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *x = Py_False; /* Integer zero */
-       static const char *kwlist[] = {"x", 0};
+       static char *kwlist[] = {"x", 0};
 
        if (type != &PyFloat_Type)
                return float_subtype_new(type, args, kwds); /* Wimp out */
index 6c683499f375084b98fee23ea1cd1e38c1bd53fe..00ae2ebe8aeedc8c7c3b8b66d11f0c14db80f7e6 100644 (file)
@@ -364,7 +364,7 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
        PyObject *closure = Py_None;
        PyFunctionObject *newfunc;
        Py_ssize_t nfree, nclosure;
-       static const char *kwlist[] = {"code", "globals", "name",
+       static char *kwlist[] = {"code", "globals", "name",
                                 "argdefs", "closure", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kw, "O!O!|OOO:function",
index 352210c81901e0cd4c9f1edc9cef5861f5853b0f..b0876aea0c7dbffaaedcfaa21f62c9d0e58051c6 100644 (file)
@@ -950,7 +950,7 @@ int_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *x = NULL;
        int base = -909;
-       static const char *kwlist[] = {"x", "base", 0};
+       static char *kwlist[] = {"x", "base", 0};
 
        if (type != &PyInt_Type)
                return int_subtype_new(type, args, kwds); /* Wimp out */
index 8b5771bf4e3af2222aacc6ed79b861f69a1528ed..0ff61e279306c704d677a0182b06b2037d583e96 100644 (file)
@@ -1986,7 +1986,7 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
        PyObject *keyfunc = NULL;
        Py_ssize_t i;
        PyObject *key, *value, *kvpair;
-       static const char *kwlist[] = {"cmp", "key", "reverse", 0};
+       static char *kwlist[] = {"cmp", "key", "reverse", 0};
 
        assert(self != NULL);
        assert (PyList_Check(self));
@@ -2360,7 +2360,7 @@ static int
 list_init(PyListObject *self, PyObject *args, PyObject *kw)
 {
        PyObject *arg = NULL;
-       static const char *kwlist[] = {"sequence", 0};
+       static char *kwlist[] = {"sequence", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:list", kwlist, &arg))
                return -1;
index 17aab35548f6bb6df09c24a53d2883c822be6c0c..345d3b4b4fce0d0b9c1a1d4f323a7b4379303963 100644 (file)
@@ -3008,7 +3008,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *x = NULL;
        int base = -909;                     /* unlikely! */
-       static const char *kwlist[] = {"x", "base", 0};
+       static char *kwlist[] = {"x", "base", 0};
 
        if (type != &PyLong_Type)
                return long_subtype_new(type, args, kwds); /* Wimp out */
index dfcf39ca8ce5b9cf4cd24033166677d475446d03..812496806be987f4beed514a6713beee6af5909e 100644 (file)
@@ -149,7 +149,7 @@ _PyModule_Clear(PyObject *m)
 static int
 module_init(PyModuleObject *m, PyObject *args, PyObject *kwds)
 {
-       static const char *kwlist[] = {"name", "doc", NULL};
+       static char *kwlist[] = {"name", "doc", NULL};
        PyObject *dict, *name = Py_None, *doc = Py_None;
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__",
                                          kwlist, &name, &doc))
index 2a1f45a9e0d1ad7e1c17bff31327df609a3bcbbe..606b3fc0c297d793f6c317ffdc9ade3d70f74105 100644 (file)
@@ -1023,7 +1023,7 @@ PyObject_GetAttrString(PyObject *v, const char *name)
        PyObject *w, *res;
 
        if (v->ob_type->tp_getattr != NULL)
-               return (*v->ob_type->tp_getattr)(v, name);
+               return (*v->ob_type->tp_getattr)(v, (char*)name);
        w = PyString_InternFromString(name);
        if (w == NULL)
                return NULL;
@@ -1051,7 +1051,7 @@ PyObject_SetAttrString(PyObject *v, const char *name, PyObject *w)
        int res;
 
        if (v->ob_type->tp_setattr != NULL)
-               return (*v->ob_type->tp_setattr)(v, name, w);
+               return (*v->ob_type->tp_setattr)(v, (char*)name, w);
        s = PyString_InternFromString(name);
        if (s == NULL)
                return -1;
index 84803083745094e0450e86810a44e4572223df3a..4fe24a345778ed6941fb32669eb3f2ea5af08538 100644 (file)
@@ -3346,7 +3346,7 @@ static PyObject *
 string_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *x = NULL;
-       static const char *kwlist[] = {"object", 0};
+       static char *kwlist[] = {"object", 0};
 
        if (type != &PyString_Type)
                return str_subtype_new(type, args, kwds);
index b266d6afa447f7017b21ff5f610d5dca323a3dd1..218d0b4dc9d711aed4198e2cf334b5e22eba5d48 100644 (file)
@@ -97,7 +97,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
        PyObject *ob;
        PyStructSequence *res = NULL;
        Py_ssize_t len, min_len, max_len, i, n_unnamed_fields;
-       static const char *kwlist[] = {"sequence", "dict", 0};
+       static char *kwlist[] = {"sequence", "dict", 0};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:structseq", 
                                         kwlist, &arg, &dict))
index 95debbb8c39bf02a6bf0cf3317cb92d4f3446673..c0383a1e0970f67ce8e6d7581011f91ef03a74b3 100644 (file)
@@ -531,7 +531,7 @@ static PyObject *
 tuple_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *arg = NULL;
-       static const char *kwlist[] = {"sequence", 0};
+       static char *kwlist[] = {"sequence", 0};
 
        if (type != &PyTuple_Type)
                return tuple_subtype_new(type, args, kwds);
index fd23bfe9bfb56f64c53108f4b51cecbb00a0de4e..6072c08687940b4b00552ea856f05d8418b30127 100644 (file)
@@ -1593,7 +1593,7 @@ static PyObject *
 type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
 {
        PyObject *name, *bases, *dict;
-       static const char *kwlist[] = {"name", "bases", "dict", 0};
+       static char *kwlist[] = {"name", "bases", "dict", 0};
        PyObject *slots, *tmp, *newslots;
        PyTypeObject *type, *base, *tmptype, *winner;
        PyHeapTypeObject *et;
index d353f1fc7aa98d8ea821feed6282dc929bdc7769..3aaf98e841d9337e34290ef7334e2f75c1cf7e93 100644 (file)
@@ -7259,7 +7259,7 @@ static PyObject *
 unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
         PyObject *x = NULL;
-       static const char *kwlist[] = {"string", "encoding", "errors", 0};
+       static char *kwlist[] = {"string", "encoding", "errors", 0};
        char *encoding = NULL;
        char *errors = NULL;
 
index 39c5db2b195ba6f81fd22a31bff634b0d7e90973..4a64ef7cc250d4dffe58253810dc1219de0615ee 100644 (file)
@@ -126,9 +126,9 @@ gc_clear(PyWeakReference *self)
 static PyObject *
 weakref_call(PyWeakReference *self, PyObject *args, PyObject *kw)
 {
-    static const char *argnames[] = {NULL};
+    static char *kwlist[] = {NULL};
 
-    if (PyArg_ParseTupleAndKeywords(args, kw, ":__call__", argnames)) {
+    if (PyArg_ParseTupleAndKeywords(args, kw, ":__call__", kwlist)) {
         PyObject *object = PyWeakref_GET_OBJECT(self);
         Py_INCREF(object);
         return (object);
index 49645181a2d58a2239e0cbbdd139471541b7b257..24c99f424470c99db6b3d267b925d616f063e74e 100644 (file)
@@ -1907,7 +1907,7 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
 {
        PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs;
        PyObject *callable;
-       static const char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
+       static char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
        int reverse;
 
        /* args 1-4 should match listsort in Objects/listobject.c */
index fbf5ceff0e0ce38574dc73cb83478546a2245d43..2af9d88547876c6ad3fc55c3623222326846e637 100644 (file)
@@ -11,9 +11,9 @@ int PyArg_ParseTuple(PyObject *, const char *, ...);
 int PyArg_VaParse(PyObject *, const char *, va_list);
 
 int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
-                               const char *, const char **, ...);
+                               const char *, char **, ...);
 int PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *,
-                               const char *, const char **, va_list);
+                               const char *, char **, va_list);
 
 #define FLAG_COMPAT 1
 #define FLAG_SIZE_T 2
@@ -31,7 +31,7 @@ static char *convertsimple(PyObject *, const char **, va_list *, int, char *,
 static Py_ssize_t convertbuffer(PyObject *, void **p, char **);
 
 static int vgetargskeywords(PyObject *, PyObject *,
-                           const char *, const char **, va_list *, int);
+                           const char *, char **, va_list *, int);
 static char *skipitem(const char **, va_list *, int);
 
 int
@@ -1141,7 +1141,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
        }
                
        case 't': { /* 8-bit character buffer, read-only access */
-               const char **p = va_arg(*p_va, const char **);
+               char **p = va_arg(*p_va, char **);
                PyBufferProcs *pb = arg->ob_type->tp_as_buffer;
                int count;
                
@@ -1210,7 +1210,7 @@ int
 PyArg_ParseTupleAndKeywords(PyObject *args,
                            PyObject *keywords,
                            const char *format, 
-                           const char **kwlist, ...)
+                           char **kwlist, ...)
 {
        int retval;
        va_list va;
@@ -1234,7 +1234,7 @@ int
 _PyArg_ParseTupleAndKeywords_SizeT(PyObject *args,
                                  PyObject *keywords,
                                  const char *format, 
-                                 const char **kwlist, ...)
+                                 char **kwlist, ...)
 {
        int retval;
        va_list va;
@@ -1260,7 +1260,7 @@ int
 PyArg_VaParseTupleAndKeywords(PyObject *args,
                               PyObject *keywords,
                               const char *format, 
-                              const char **kwlist, va_list va)
+                              char **kwlist, va_list va)
 {
        int retval;
        va_list lva;
@@ -1292,7 +1292,7 @@ int
 _PyArg_VaParseTupleAndKeywords_SizeT(PyObject *args,
                                    PyObject *keywords,
                                    const char *format, 
-                                   const char **kwlist, va_list va)
+                                   char **kwlist, va_list va)
 {
        int retval;
        va_list lva;
@@ -1324,7 +1324,7 @@ _PyArg_VaParseTupleAndKeywords_SizeT(PyObject *args,
 
 static int
 vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
-                const char **kwlist, va_list *p_va, int flags)
+                char **kwlist, va_list *p_va, int flags)
 {
        char msgbuf[512];
        int levels[32];
@@ -1332,7 +1332,8 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
        int min, max;
        const char *formatsave;
        int i, len, nargs, nkeywords;
-       const char *msg, **p;
+       const char *msg;
+       char **p;
        PyObject *freelist = NULL;
 
        assert(args != NULL && PyTuple_Check(args));