Skip to content

Commit 6ff1c9b

Browse files
committed
CPyLong_ToBytes header
1 parent cb93329 commit 6ff1c9b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

mypyc/lib-rt/CPy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ CPyTagged CPyTagged_BitwiseLongOp_(CPyTagged a, CPyTagged b, char op);
140140
CPyTagged CPyTagged_Rshift_(CPyTagged left, CPyTagged right);
141141
CPyTagged CPyTagged_Lshift_(CPyTagged left, CPyTagged right);
142142
PyObject *CPyTagged_ToBytes(CPyTagged self, Py_ssize_t length, PyObject *byteorder, int signed_flag)
143+
PyObject *CPyLong_ToBytes(PyObject *v, Py_ssize_t length, const char *byteorder, int signed_flag)
143144

144145
PyObject *CPyTagged_Str(CPyTagged n);
145146
CPyTagged CPyTagged_FromFloat(double f);

mypyc/lib-rt/int_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ PyObject *CPyTagged_ToBytes(CPyTagged self, Py_ssize_t length, PyObject *byteord
606606
}
607607

608608
// Helper for PyLong_ToBytes (Python 3.2+)
609-
PyObject *PyLong_ToBytes(PyObject *v, Py_ssize_t length, const char *byteorder, int signed_flag) {
609+
PyObject *CPyLong_ToBytes(PyObject *v, Py_ssize_t length, const char *byteorder, int signed_flag) {
610610
// This is a wrapper for PyLong_AsByteArray and PyBytes_FromStringAndSize
611611
unsigned char *bytes = (unsigned char *)PyMem_Malloc(length);
612612
if (!bytes) {

0 commit comments

Comments
 (0)