Removed marshal.c patch (fixed upstream)
This commit is contained in:
parent
b64e81110d
commit
3bea150658
|
@ -1,57 +0,0 @@
|
|||
--- Python-2.7.5/Python/marshal.c 2013-05-12 05:32:53.000000000 +0200
|
||||
+++ /home/rkuska/hg/cpython/Python/marshal.c 2013-07-18 10:33:26.392486235 +0200
|
||||
@@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-w_string(char *s, Py_ssize_t n, WFILE *p)
|
||||
+w_string(const char *s, Py_ssize_t n, WFILE *p)
|
||||
{
|
||||
if (p->fp != NULL) {
|
||||
fwrite(s, 1, n, p->fp);
|
||||
@@ -141,6 +141,13 @@
|
||||
# define W_SIZE w_long
|
||||
#endif
|
||||
|
||||
+static void
|
||||
+w_pstring(const char *s, Py_ssize_t n, WFILE *p)
|
||||
+{
|
||||
+ W_SIZE(n, p);
|
||||
+ w_string(s, n, p);
|
||||
+}
|
||||
+
|
||||
/* We assume that Python longs are stored internally in base some power of
|
||||
2**15; for the sake of portability we'll always read and write them in base
|
||||
exactly 2**15. */
|
||||
@@ -338,9 +345,7 @@
|
||||
else {
|
||||
w_byte(TYPE_STRING, p);
|
||||
}
|
||||
- n = PyString_GET_SIZE(v);
|
||||
- W_SIZE(n, p);
|
||||
- w_string(PyString_AS_STRING(v), n, p);
|
||||
+ w_pstring(PyBytes_AS_STRING(v), PyString_GET_SIZE(v), p);
|
||||
}
|
||||
#ifdef Py_USING_UNICODE
|
||||
else if (PyUnicode_CheckExact(v)) {
|
||||
@@ -352,9 +357,7 @@
|
||||
return;
|
||||
}
|
||||
w_byte(TYPE_UNICODE, p);
|
||||
- n = PyString_GET_SIZE(utf8);
|
||||
- W_SIZE(n, p);
|
||||
- w_string(PyString_AS_STRING(utf8), n, p);
|
||||
+ w_pstring(PyString_AS_STRING(utf8), PyString_GET_SIZE(utf8), p);
|
||||
Py_DECREF(utf8);
|
||||
}
|
||||
#endif
|
||||
@@ -441,8 +444,7 @@
|
||||
PyBufferProcs *pb = v->ob_type->tp_as_buffer;
|
||||
w_byte(TYPE_STRING, p);
|
||||
n = (*pb->bf_getreadbuffer)(v, 0, (void **)&s);
|
||||
- W_SIZE(n, p);
|
||||
- w_string(s, n, p);
|
||||
+ w_pstring(s, n, p);
|
||||
}
|
||||
else {
|
||||
w_byte(TYPE_UNKNOWN, p);
|
|
@ -827,10 +827,6 @@ Patch184: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch
|
|||
# when ftp_proxy is set
|
||||
Patch185: 00185-urllib2-honors-noproxy-for-ftp.patch
|
||||
|
||||
# 00186 #
|
||||
# Fix memory leak of variable utf8 in marshal.c
|
||||
Patch186: 00186-memory-leak-marshalc.patch
|
||||
|
||||
# 00187 #
|
||||
# Add an explicit RPATH to pyexpat.so pointing at the directory
|
||||
# containing the system expat (which has the extra XML_SetHashSalt
|
||||
|
@ -1205,7 +1201,6 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
|
|||
# 00183: not for python 2
|
||||
%patch184 -p1
|
||||
%patch185 -p1
|
||||
%patch186 -p1
|
||||
%patch187 -p1
|
||||
%patch188 -p1
|
||||
%patch189 -p1
|
||||
|
|
Loading…
Reference in New Issue