[Python-checkins] r42596 - in python/trunk: 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

martin.v.loewis python-checkins at python.org
Mon Feb 27 17:46:25 CET 2006


Author: martin.v.loewis
Date: Mon Feb 27 17:46:16 2006
New Revision: 42596

Modified:
   python/trunk/Include/modsupport.h
   python/trunk/Include/object.h
   python/trunk/Modules/_cursesmodule.c
   python/trunk/Modules/_hashopenssl.c
   python/trunk/Modules/_lsprof.c
   python/trunk/Modules/_sre.c
   python/trunk/Modules/binascii.c
   python/trunk/Modules/bz2module.c
   python/trunk/Modules/cPickle.c
   python/trunk/Modules/nismodule.c
   python/trunk/Modules/pyexpat.c
   python/trunk/Modules/sha256module.c
   python/trunk/Modules/sha512module.c
   python/trunk/Modules/shamodule.c
   python/trunk/Objects/abstract.c
   python/trunk/Objects/boolobject.c
   python/trunk/Objects/classobject.c
   python/trunk/Objects/complexobject.c
   python/trunk/Objects/descrobject.c
   python/trunk/Objects/enumobject.c
   python/trunk/Objects/fileobject.c
   python/trunk/Objects/floatobject.c
   python/trunk/Objects/funcobject.c
   python/trunk/Objects/intobject.c
   python/trunk/Objects/listobject.c
   python/trunk/Objects/longobject.c
   python/trunk/Objects/moduleobject.c
   python/trunk/Objects/object.c
   python/trunk/Objects/stringobject.c
   python/trunk/Objects/structseq.c
   python/trunk/Objects/tupleobject.c
   python/trunk/Objects/typeobject.c
   python/trunk/Objects/unicodeobject.c
   python/trunk/Objects/weakrefobject.c
   python/trunk/Python/bltinmodule.c
   python/trunk/Python/getargs.c
Log:
Revert backwards-incompatible const changes.


Modified: python/trunk/Include/modsupport.h
==============================================================================
--- python/trunk/Include/modsupport.h	(original)
+++ python/trunk/Include/modsupport.h	Mon Feb 27 17:46:16 2006
@@ -24,14 +24,14 @@
 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 *);

Modified: python/trunk/Include/object.h
==============================================================================
--- python/trunk/Include/object.h	(original)
+++ python/trunk/Include/object.h	Mon Feb 27 17:46:16 2006
@@ -144,12 +144,12 @@
 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 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 *);

Modified: python/trunk/Modules/_cursesmodule.c
==============================================================================
--- python/trunk/Modules/_cursesmodule.c	(original)
+++ python/trunk/Modules/_cursesmodule.c	Mon Feb 27 17:46:16 2006
@@ -1886,7 +1886,7 @@
 	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)) {

Modified: python/trunk/Modules/_hashopenssl.c
==============================================================================
--- python/trunk/Modules/_hashopenssl.c	(original)
+++ python/trunk/Modules/_hashopenssl.c	Mon Feb 27 17:46:16 2006
@@ -234,7 +234,7 @@
 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 @@
 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;

Modified: python/trunk/Modules/_lsprof.c
==============================================================================
--- python/trunk/Modules/_lsprof.c	(original)
+++ python/trunk/Modules/_lsprof.c	Mon Feb 27 17:46:16 2006
@@ -675,7 +675,7 @@
 {
 	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 @@
 #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,

Modified: python/trunk/Modules/_sre.c
==============================================================================
--- python/trunk/Modules/_sre.c	(original)
+++ python/trunk/Modules/_sre.c	Mon Feb 27 17:46:16 2006
@@ -2010,7 +2010,7 @@
     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 @@
     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 @@
     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 @@
 
     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 @@
     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 @@
     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 @@
     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 @@
     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;
 

Modified: python/trunk/Modules/binascii.c
==============================================================================
--- python/trunk/Modules/binascii.c	(original)
+++ python/trunk/Modules/binascii.c	Mon Feb 27 17:46:16 2006
@@ -1032,7 +1032,7 @@
 	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 @@
 	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;

Modified: python/trunk/Modules/bz2module.c
==============================================================================
--- python/trunk/Modules/bz2module.c	(original)
+++ python/trunk/Modules/bz2module.c	Mon Feb 27 17:46:16 2006
@@ -1275,7 +1275,7 @@
 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 @@
 {
 	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 @@
 	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,

Modified: python/trunk/Modules/cPickle.c
==============================================================================
--- python/trunk/Modules/cPickle.c	(original)
+++ python/trunk/Modules/cPickle.c	Mon Feb 27 17:46:16 2006
@@ -2868,7 +2868,7 @@
 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 @@
 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 @@
 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;

Modified: python/trunk/Modules/nismodule.c
==============================================================================
--- python/trunk/Modules/nismodule.c	(original)
+++ python/trunk/Modules/nismodule.c	Mon Feb 27 17:46:16 2006
@@ -160,7 +160,7 @@
 	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 @@
 	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 @@
 	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))

Modified: python/trunk/Modules/pyexpat.c
==============================================================================
--- python/trunk/Modules/pyexpat.c	(original)
+++ python/trunk/Modules/pyexpat.c	Mon Feb 27 17:46:16 2006
@@ -1726,7 +1726,7 @@
     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,

Modified: python/trunk/Modules/sha256module.c
==============================================================================
--- python/trunk/Modules/sha256module.c	(original)
+++ python/trunk/Modules/sha256module.c	Mon Feb 27 17:46:16 2006
@@ -624,7 +624,7 @@
 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 @@
 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;

Modified: python/trunk/Modules/sha512module.c
==============================================================================
--- python/trunk/Modules/sha512module.c	(original)
+++ python/trunk/Modules/sha512module.c	Mon Feb 27 17:46:16 2006
@@ -690,7 +690,7 @@
 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 @@
 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;

Modified: python/trunk/Modules/shamodule.c
==============================================================================
--- python/trunk/Modules/shamodule.c	(original)
+++ python/trunk/Modules/shamodule.c	Mon Feb 27 17:46:16 2006
@@ -543,7 +543,7 @@
 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;

Modified: python/trunk/Objects/abstract.c
==============================================================================
--- python/trunk/Objects/abstract.c	(original)
+++ python/trunk/Objects/abstract.c	Mon Feb 27 17:46:16 2006
@@ -221,7 +221,7 @@
 			  Py_ssize_t *buffer_len)
 {
 	PyBufferProcs *pb;
-	const char *pp;
+	char *pp;
 	Py_ssize_t len;
 
 	if (obj == NULL || buffer == NULL || buffer_len == NULL) {

Modified: python/trunk/Objects/boolobject.c
==============================================================================
--- python/trunk/Objects/boolobject.c	(original)
+++ python/trunk/Objects/boolobject.c	Mon Feb 27 17:46:16 2006
@@ -50,7 +50,7 @@
 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;
 

Modified: python/trunk/Objects/classobject.c
==============================================================================
--- python/trunk/Objects/classobject.c	(original)
+++ python/trunk/Objects/classobject.c	Mon Feb 27 17:46:16 2006
@@ -159,7 +159,7 @@
 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))

Modified: python/trunk/Objects/complexobject.c
==============================================================================
--- python/trunk/Objects/complexobject.c	(original)
+++ python/trunk/Objects/complexobject.c	Mon Feb 27 17:46:16 2006
@@ -829,7 +829,7 @@
 	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;

Modified: python/trunk/Objects/descrobject.c
==============================================================================
--- python/trunk/Objects/descrobject.c	(original)
+++ python/trunk/Objects/descrobject.c	Mon Feb 27 17:46:16 2006
@@ -1182,7 +1182,7 @@
 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",

Modified: python/trunk/Objects/enumobject.c
==============================================================================
--- python/trunk/Objects/enumobject.c	(original)
+++ python/trunk/Objects/enumobject.c	Mon Feb 27 17:46:16 2006
@@ -16,7 +16,7 @@
 {
 	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))

Modified: python/trunk/Objects/fileobject.c
==============================================================================
--- python/trunk/Objects/fileobject.c	(original)
+++ python/trunk/Objects/fileobject.c	Mon Feb 27 17:46:16 2006
@@ -1925,7 +1925,7 @@
 {
 	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;

Modified: python/trunk/Objects/floatobject.c
==============================================================================
--- python/trunk/Objects/floatobject.c	(original)
+++ python/trunk/Objects/floatobject.c	Mon Feb 27 17:46:16 2006
@@ -940,7 +940,7 @@
 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 */

Modified: python/trunk/Objects/funcobject.c
==============================================================================
--- python/trunk/Objects/funcobject.c	(original)
+++ python/trunk/Objects/funcobject.c	Mon Feb 27 17:46:16 2006
@@ -364,7 +364,7 @@
 	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",

Modified: python/trunk/Objects/intobject.c
==============================================================================
--- python/trunk/Objects/intobject.c	(original)
+++ python/trunk/Objects/intobject.c	Mon Feb 27 17:46:16 2006
@@ -950,7 +950,7 @@
 {
 	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 */

Modified: python/trunk/Objects/listobject.c
==============================================================================
--- python/trunk/Objects/listobject.c	(original)
+++ python/trunk/Objects/listobject.c	Mon Feb 27 17:46:16 2006
@@ -1986,7 +1986,7 @@
 	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 @@
 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;

Modified: python/trunk/Objects/longobject.c
==============================================================================
--- python/trunk/Objects/longobject.c	(original)
+++ python/trunk/Objects/longobject.c	Mon Feb 27 17:46:16 2006
@@ -3008,7 +3008,7 @@
 {
 	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 */

Modified: python/trunk/Objects/moduleobject.c
==============================================================================
--- python/trunk/Objects/moduleobject.c	(original)
+++ python/trunk/Objects/moduleobject.c	Mon Feb 27 17:46:16 2006
@@ -149,7 +149,7 @@
 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))

Modified: python/trunk/Objects/object.c
==============================================================================
--- python/trunk/Objects/object.c	(original)
+++ python/trunk/Objects/object.c	Mon Feb 27 17:46:16 2006
@@ -1023,7 +1023,7 @@
 	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 @@
 	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;

Modified: python/trunk/Objects/stringobject.c
==============================================================================
--- python/trunk/Objects/stringobject.c	(original)
+++ python/trunk/Objects/stringobject.c	Mon Feb 27 17:46:16 2006
@@ -3346,7 +3346,7 @@
 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);

Modified: python/trunk/Objects/structseq.c
==============================================================================
--- python/trunk/Objects/structseq.c	(original)
+++ python/trunk/Objects/structseq.c	Mon Feb 27 17:46:16 2006
@@ -97,7 +97,7 @@
 	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))

Modified: python/trunk/Objects/tupleobject.c
==============================================================================
--- python/trunk/Objects/tupleobject.c	(original)
+++ python/trunk/Objects/tupleobject.c	Mon Feb 27 17:46:16 2006
@@ -531,7 +531,7 @@
 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);

Modified: python/trunk/Objects/typeobject.c
==============================================================================
--- python/trunk/Objects/typeobject.c	(original)
+++ python/trunk/Objects/typeobject.c	Mon Feb 27 17:46:16 2006
@@ -1593,7 +1593,7 @@
 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;

Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Mon Feb 27 17:46:16 2006
@@ -7259,7 +7259,7 @@
 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;
 

Modified: python/trunk/Objects/weakrefobject.c
==============================================================================
--- python/trunk/Objects/weakrefobject.c	(original)
+++ python/trunk/Objects/weakrefobject.c	Mon Feb 27 17:46:16 2006
@@ -126,9 +126,9 @@
 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);

Modified: python/trunk/Python/bltinmodule.c
==============================================================================
--- python/trunk/Python/bltinmodule.c	(original)
+++ python/trunk/Python/bltinmodule.c	Mon Feb 27 17:46:16 2006
@@ -1907,7 +1907,7 @@
 {
 	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 */

Modified: python/trunk/Python/getargs.c
==============================================================================
--- python/trunk/Python/getargs.c	(original)
+++ python/trunk/Python/getargs.c	Mon Feb 27 17:46:16 2006
@@ -11,9 +11,9 @@
 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 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 @@
 	}
 		
 	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 @@
 PyArg_ParseTupleAndKeywords(PyObject *args,
 			    PyObject *keywords,
 			    const char *format, 
-			    const char **kwlist, ...)
+			    char **kwlist, ...)
 {
 	int retval;
 	va_list va;
@@ -1234,7 +1234,7 @@
 _PyArg_ParseTupleAndKeywords_SizeT(PyObject *args,
 				  PyObject *keywords,
 				  const char *format, 
-				  const char **kwlist, ...)
+				  char **kwlist, ...)
 {
 	int retval;
 	va_list va;
@@ -1260,7 +1260,7 @@
 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 @@
 _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 @@
 
 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 @@
 	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));


More information about the Python-checkins mailing list