fix long vs long long bugs
these bugs were introduced by "fix long/int confusions in pyx version of unpack" commit.
This commit is contained in:
		@@ -70,7 +70,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    PyObject *p;
 | 
					    PyObject *p;
 | 
				
			||||||
    if (d > LONG_MAX) {
 | 
					    if (d > LONG_MAX) {
 | 
				
			||||||
        p = PyLong_FromUnsignedLongLong((unsigned long)d);
 | 
					        p = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)d);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        p = PyInt_FromLong((long)d);
 | 
					        p = PyInt_FromLong((long)d);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -103,7 +103,7 @@ static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpac
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    PyObject *p;
 | 
					    PyObject *p;
 | 
				
			||||||
    if (d > LONG_MAX || d < LONG_MIN) {
 | 
					    if (d > LONG_MAX || d < LONG_MIN) {
 | 
				
			||||||
        p = PyLong_FromLongLong((unsigned long)d);
 | 
					        p = PyLong_FromLongLong((unsigned PY_LONG_LONG)d);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        p = PyInt_FromLong((long)d);
 | 
					        p = PyInt_FromLong((long)d);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user