diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:46:16 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:46:16 (GMT) |
commit | 15e62742fad688b026ba80bf17d1345c4cbd423b (patch) | |
tree | fb3545d1da59e94df32d48f21df620681b08765c /Objects | |
parent | f9f61b4aa281c1b19546dba7f1ee529b8b80bc9a (diff) | |
download | cpython-15e62742fad688b026ba80bf17d1345c4cbd423b.zip cpython-15e62742fad688b026ba80bf17d1345c4cbd423b.tar.gz cpython-15e62742fad688b026ba80bf17d1345c4cbd423b.tar.bz2 |
Revert backwards-incompatible const changes.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 2 | ||||
-rw-r--r-- | Objects/boolobject.c | 2 | ||||
-rw-r--r-- | Objects/classobject.c | 2 | ||||
-rw-r--r-- | Objects/complexobject.c | 2 | ||||
-rw-r--r-- | Objects/descrobject.c | 2 | ||||
-rw-r--r-- | Objects/enumobject.c | 2 | ||||
-rw-r--r-- | Objects/fileobject.c | 2 | ||||
-rw-r--r-- | Objects/floatobject.c | 2 | ||||
-rw-r--r-- | Objects/funcobject.c | 2 | ||||
-rw-r--r-- | Objects/intobject.c | 2 | ||||
-rw-r--r-- | Objects/listobject.c | 4 | ||||
-rw-r--r-- | Objects/longobject.c | 2 | ||||
-rw-r--r-- | Objects/moduleobject.c | 2 | ||||
-rw-r--r-- | Objects/object.c | 4 | ||||
-rw-r--r-- | Objects/stringobject.c | 2 | ||||
-rw-r--r-- | Objects/structseq.c | 2 | ||||
-rw-r--r-- | Objects/tupleobject.c | 2 | ||||
-rw-r--r-- | Objects/typeobject.c | 2 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 2 | ||||
-rw-r--r-- | Objects/weakrefobject.c | 4 |
20 files changed, 23 insertions, 23 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index a7cc0d6..dc46193 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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) { diff --git a/Objects/boolobject.c b/Objects/boolobject.c index 677a98b..f2429fe 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -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; diff --git a/Objects/classobject.c b/Objects/classobject.c index 9a36f7d..34afb9e 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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)) diff --git a/Objects/complexobject.c b/Objects/complexobject.c index f29a90f..5c84eff 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -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; diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 6972a69..b96ad6e 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -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", diff --git a/Objects/enumobject.c b/Objects/enumobject.c index ea85e3c..5999ae9 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -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)) diff --git a/Objects/fileobject.c b/Objects/fileobject.c index e4fffdd..d535869 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -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; diff --git a/Objects/floatobject.c b/Objects/floatobject.c index e1e063b..bc19a5b 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -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 */ diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 6c68349..00ae2eb 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -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", diff --git a/Objects/intobject.c b/Objects/intobject.c index 352210c..b0876ae 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -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 */ diff --git a/Objects/listobject.c b/Objects/listobject.c index 8b5771b..0ff61e2 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -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; diff --git a/Objects/longobject.c b/Objects/longobject.c index 17aab35..345d3b4 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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 */ diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index dfcf39c..8124968 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -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)) diff --git a/Objects/object.c b/Objects/object.c index 2a1f45a..606b3fc 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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; diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 8480308..4fe24a3 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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); diff --git a/Objects/structseq.c b/Objects/structseq.c index b266d6a..218d0b4 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -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)) diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 95debbb..c0383a1 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -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); diff --git a/Objects/typeobject.c b/Objects/typeobject.c index fd23bfe..6072c08 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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; diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d353f1f..3aaf98e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 39c5db2..4a64ef7 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -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); |