[Python-checkins] cpython: remove unused string WILFE attribute
benjamin.peterson
python-checkins at python.org
Fri May 27 16:07:46 CEST 2011
http://hg.python.org/cpython/rev/2bd219aff8e7
changeset: 70434:2bd219aff8e7
user: Benjamin Peterson <benjamin at python.org>
date: Fri May 27 07:53:28 2011 -0500
summary:
remove unused string WILFE attribute
files:
Python/marshal.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/Python/marshal.c b/Python/marshal.c
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -60,7 +60,6 @@
PyObject *str;
char *ptr;
char *end;
- PyObject *strings; /* dict on marshal, list on unmarshal */
int version;
} WFILE;
@@ -444,7 +443,6 @@
wf.fp = fp;
wf.error = WFERR_OK;
wf.depth = 0;
- wf.strings = NULL;
wf.version = version;
w_long(x, &wf);
}
@@ -456,10 +454,8 @@
wf.fp = fp;
wf.error = WFERR_OK;
wf.depth = 0;
- wf.strings = (version > 0) ? PyDict_New() : NULL;
wf.version = version;
w_object(x, &wf);
- Py_XDECREF(wf.strings);
}
typedef WFILE RFILE; /* Same struct with different invariants */
@@ -1041,7 +1037,6 @@
RFILE rf;
assert(fp);
rf.fp = fp;
- rf.strings = NULL;
rf.end = rf.ptr = NULL;
return r_short(&rf);
}
@@ -1051,7 +1046,6 @@
{
RFILE rf;
rf.fp = fp;
- rf.strings = NULL;
rf.ptr = rf.end = NULL;
return r_long(&rf);
}
@@ -1112,11 +1106,9 @@
RFILE rf;
PyObject *result;
rf.fp = fp;
- rf.strings = PyList_New(0);
rf.depth = 0;
rf.ptr = rf.end = NULL;
result = r_object(&rf);
- Py_DECREF(rf.strings);
return result;
}
@@ -1128,10 +1120,8 @@
rf.fp = NULL;
rf.ptr = str;
rf.end = str + len;
- rf.strings = PyList_New(0);
rf.depth = 0;
result = r_object(&rf);
- Py_DECREF(rf.strings);
return result;
}
@@ -1150,9 +1140,7 @@
wf.error = WFERR_OK;
wf.depth = 0;
wf.version = version;
- wf.strings = (version > 0) ? PyDict_New() : NULL;
w_object(x, &wf);
- Py_XDECREF(wf.strings);
if (wf.str != NULL) {
char *base = PyBytes_AS_STRING((PyBytesObject *)wf.str);
if (wf.ptr - base > PY_SSIZE_T_MAX) {
@@ -1242,10 +1230,8 @@
Py_DECREF(data);
return NULL;
}
- rf.strings = PyList_New(0);
rf.depth = 0;
result = read_object(&rf);
- Py_DECREF(rf.strings);
Py_DECREF(data);
return result;
}
@@ -1298,10 +1284,8 @@
rf.fp = NULL;
rf.ptr = s;
rf.end = s + n;
- rf.strings = PyList_New(0);
rf.depth = 0;
result = read_object(&rf);
- Py_DECREF(rf.strings);
PyBuffer_Release(&p);
return result;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list