From 17bf369b70cb00bd8e0fca81cd67cb888fe639b6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 9 Aug 2008 14:12:23 +0200 Subject: [PATCH] fix format string in __Pyx_AddTraceback() to let it match input types (line number is not defined as unsigned) --- Cython/Compiler/Nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 5d43e81f..b39fc13d 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -4448,9 +4448,9 @@ static void __Pyx_AddTraceback(const char *funcname) { if (!py_srcfile) goto bad; if (%(CLINENO)s) { #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%%s (%%s:%%u)", funcname, %(CFILENAME)s, %(CLINENO)s); + py_funcname = PyString_FromFormat( "%%s (%%s:%%d)", funcname, %(CFILENAME)s, %(CLINENO)s); #else - py_funcname = PyUnicode_FromFormat( "%%s (%%s:%%u)", funcname, %(CFILENAME)s, %(CLINENO)s); + py_funcname = PyUnicode_FromFormat( "%%s (%%s:%%d)", funcname, %(CFILENAME)s, %(CLINENO)s); #endif } else { -- 2.26.2