Use sb4 instead of int in order to handle 64-bit platforms properly.
This commit is contained in:
parent
373e79572d
commit
60cd74aed4
@ -473,7 +473,7 @@ static udt_VariableType *Variable_TypeByValue(
|
|||||||
return &vt_Float;
|
return &vt_Float;
|
||||||
if (PyBuffer_Check(value)) {
|
if (PyBuffer_Check(value)) {
|
||||||
const void *buffer;
|
const void *buffer;
|
||||||
if (PyObject_AsReadBuffer(value, &buffer, (int*) size) < 0)
|
if (PyObject_AsReadBuffer(value, &buffer, (sb4*) size) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (*size > MAX_BINARY_BYTES)
|
if (*size > MAX_BINARY_BYTES)
|
||||||
return &vt_LongBinary;
|
return &vt_LongBinary;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user