Menu

#1311 Passing default value of function parameter with 'ul' numeric suffix to python generates syntax error

None
closed-fixed
nobody
5
2022-02-14
2013-04-08
curltiger
No

SWIG Version 2.0.8

class A{
public:
A(uint32_t a = 32UL) : a(a) {}
uint32_t a;
};

will get the 'UL' suffix in python wrapper too, which generate syntax error in python.

Discussion

  • Olly Betts

    Olly Betts - 2022-02-14
    • status: open --> closed-fixed
    • Group: -->
     
  • Olly Betts

    Olly Betts - 2022-02-14

    SWIG 4.0.2 generates a working .py with:

        def __init__(self, a=32):
    
     

Log in to post a comment.