mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-01 01:50:54 +00:00
Fix double INCREF-ing when unpacking.
This commit is contained in:
parent
b0f42ca49e
commit
46fae3d893
2 changed files with 13 additions and 11 deletions
20
msgpack.c
20
msgpack.c
|
|
@ -1,4 +1,4 @@
|
|||
/* Generated by Cython 0.11.2 on Mon Jun 8 01:28:30 2009 */
|
||||
/* Generated by Cython 0.11.2 on Mon Jun 8 12:41:02 2009 */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
|
@ -1724,7 +1724,7 @@ static PyObject *__pyx_pf_7msgpack_unpacks(PyObject *__pyx_self, PyObject *__pyx
|
|||
PyObject *__pyx_r = NULL;
|
||||
const char* __pyx_t_1;
|
||||
Py_ssize_t __pyx_t_2;
|
||||
PyObject *__pyx_t_3;
|
||||
PyObject *__pyx_t_3 = NULL;
|
||||
__Pyx_SetupRefcountContext("unpacks");
|
||||
__pyx_self = __pyx_self;
|
||||
|
||||
|
|
@ -1752,7 +1752,7 @@ static PyObject *__pyx_pf_7msgpack_unpacks(PyObject *__pyx_self, PyObject *__pyx
|
|||
* cdef size_t off = 0
|
||||
* template_init(&ctx) # <<<<<<<<<<<<<<
|
||||
* template_execute(&ctx, p, len(packed_bytes), &off)
|
||||
* return <object> template_data(&ctx)
|
||||
* return template_data(&ctx)
|
||||
*/
|
||||
template_init((&__pyx_v_ctx));
|
||||
|
||||
|
|
@ -1760,7 +1760,7 @@ static PyObject *__pyx_pf_7msgpack_unpacks(PyObject *__pyx_self, PyObject *__pyx
|
|||
* cdef size_t off = 0
|
||||
* template_init(&ctx)
|
||||
* template_execute(&ctx, p, len(packed_bytes), &off) # <<<<<<<<<<<<<<
|
||||
* return <object> template_data(&ctx)
|
||||
* return template_data(&ctx)
|
||||
*
|
||||
*/
|
||||
__pyx_t_2 = PyObject_Length(__pyx_v_packed_bytes); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
||||
|
|
@ -1769,19 +1769,21 @@ static PyObject *__pyx_pf_7msgpack_unpacks(PyObject *__pyx_self, PyObject *__pyx
|
|||
/* "/home/inada-n/work/msgpack.py/python/msgpack.pyx":186
|
||||
* template_init(&ctx)
|
||||
* template_execute(&ctx, p, len(packed_bytes), &off)
|
||||
* return <object> template_data(&ctx) # <<<<<<<<<<<<<<
|
||||
* return template_data(&ctx) # <<<<<<<<<<<<<<
|
||||
*
|
||||
* def unpack(object stream):
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_3 = template_data((&__pyx_v_ctx));
|
||||
__Pyx_INCREF(((PyObject *)__pyx_t_3));
|
||||
__pyx_r = ((PyObject *)__pyx_t_3);
|
||||
__pyx_t_3 = template_data((&__pyx_v_ctx)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__pyx_r = __pyx_t_3;
|
||||
__pyx_t_3 = 0;
|
||||
goto __pyx_L0;
|
||||
|
||||
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
||||
goto __pyx_L0;
|
||||
__pyx_L1_error:;
|
||||
__Pyx_XDECREF(__pyx_t_3);
|
||||
__Pyx_AddTraceback("msgpack.unpacks");
|
||||
__pyx_r = NULL;
|
||||
__pyx_L0:;
|
||||
|
|
@ -1791,7 +1793,7 @@ static PyObject *__pyx_pf_7msgpack_unpacks(PyObject *__pyx_self, PyObject *__pyx
|
|||
}
|
||||
|
||||
/* "/home/inada-n/work/msgpack.py/python/msgpack.pyx":188
|
||||
* return <object> template_data(&ctx)
|
||||
* return template_data(&ctx)
|
||||
*
|
||||
* def unpack(object stream): # <<<<<<<<<<<<<<
|
||||
* """unpack from stream."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue