diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-05-27 12:53:28 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-05-27 12:53:28 (GMT) |
commit | d408503b2c74b53f734adab6cd35866be460ce5e (patch) | |
tree | 748b2e74307921210eca994bcd1b571335cdb056 /Python | |
parent | 4e18ac850f4ba24d5de10137b9e04a900fc3e215 (diff) | |
download | cpython-d408503b2c74b53f734adab6cd35866be460ce5e.zip cpython-d408503b2c74b53f734adab6cd35866be460ce5e.tar.gz cpython-d408503b2c74b53f734adab6cd35866be460ce5e.tar.bz2 |
remove unused string WILFE attribute
Diffstat (limited to 'Python')
-rw-r--r-- | Python/marshal.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 73d4f37..f66b765 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -60,7 +60,6 @@ typedef struct { PyObject *str; char *ptr; char *end; - PyObject *strings; /* dict on marshal, list on unmarshal */ int version; } WFILE; @@ -444,7 +443,6 @@ PyMarshal_WriteLongToFile(long x, FILE *fp, int version) wf.fp = fp; wf.error = WFERR_OK; wf.depth = 0; - wf.strings = NULL; wf.version = version; w_long(x, &wf); } @@ -456,10 +454,8 @@ PyMarshal_WriteObjectToFile(PyObject *x, FILE *fp, int version) 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 @@ PyMarshal_ReadShortFromFile(FILE *fp) RFILE rf; assert(fp); rf.fp = fp; - rf.strings = NULL; rf.end = rf.ptr = NULL; return r_short(&rf); } @@ -1051,7 +1046,6 @@ PyMarshal_ReadLongFromFile(FILE *fp) { RFILE rf; rf.fp = fp; - rf.strings = NULL; rf.ptr = rf.end = NULL; return r_long(&rf); } @@ -1112,11 +1106,9 @@ PyMarshal_ReadObjectFromFile(FILE *fp) 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 @@ PyMarshal_ReadObjectFromString(char *str, Py_ssize_t len) 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 @@ PyMarshal_WriteObjectToString(PyObject *x, int version) 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 @@ marshal_load(PyObject *self, PyObject *f) 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 @@ marshal_loads(PyObject *self, PyObject *args) 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; } |