...for python-pre-2.4.3 compatibility. The "I" option was broken before
python 2.4.3, even though it was supposed to be supported since python 2.3.
Reported by Michael Budde.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
return NULL;
v = ntohl(*(uint32_t *)buf);
- return Py_BuildValue("I", v);
+ return PyLong_FromUnsignedLong(v);
}
mask = (1<<nbits) - 1;
v = ntohl(*(uint32_t *)buf);
v = (v >> (32-nbits)) & mask;
- return Py_BuildValue("I", v);
+ return PyLong_FromUnsignedLong(v);
}