tags 550809 + upstream confirmed thanks On Tue, Oct 13, 2009 at 08:03:22AM +0200, Philipp Marek wrote: > I tried to use SWIG on svn_error_codes.h and noticed that some constants get > wrong names: > > In the .h I see > SVN_WARNING = APR_OS_START_USERERR + 1, > while the .clisp gets > (:SVN_WARNING #.(cl:+ APR_OS_START_SERERR 1)) > > > The "_SERERR" should be "_USERERR".
This bug is still present in SWIG trunk r12846. The culprit is these lines in convert_literal() in Source/Modules/cffi.cxx: Replaceall(num, "u", ""); Replaceall(num, "U", ""); Replaceall(num, "l", ""); Replaceall(num, "L", ""); The intention is clearly to change numeric constants like 1234L to 1234, but this is much too crude a way to do it, and only will only work reliably for expressions containing only literal numbers. These suffixes should only get removed when following a token consisting of only digits (but multiple should get removed - e.g. 1234UL to 1234). But really this code should actually parse the C/C++ constant expression and build the CFFI expression from the parse tree - trying to do this with string operations is going to fail in a lot of cases. Cheers, Olly -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org