Skip to content

Commit 3d23d8a

Browse files
wdauchycapflam
authored andcommitted
BUG/MINOR: spoa-server: fix size_t format printing
From https://www.python.org/dev/peps/pep-0353/ "A new type Py_ssize_t is introduced, which has the same size as the compiler's size_t type, but is signed. It will be a typedef for ssize_t where available." For integer types, causes printf to expect a size_t-sized integer argument. This should fix github issue #702 This should be backported to >= v2.2 Signed-off-by: William Dauchy <[email protected]>
1 parent 40f44b5 commit 3d23d8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ps_python.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static int ps_python_check_overflow(Py_ssize_t len)
6666
*/
6767
if (len >= (Py_ssize_t)INT_MAX) {
6868
PyErr_Format(spoa_error,
69-
"%d is over 2GB. Please split in smaller pieces.", \
69+
"%zd is over 2GB. Please split in smaller pieces.", \
7070
len);
7171
return -1;
7272
} else {

0 commit comments

Comments
 (0)