sip: error parsing default arguments with macros

Scott Talbert swt at techie.net
Mon Jun 6 18:58:16 BST 2022


Hi Phil,

This is with 73d165da863c.  Running into this issue where sip seems to 
have trouble with default argument values that are macros.  See attached 
_richtext.sip for a reproducer.

These bindings will be built: _richtext.
Generating the _richtext bindings...
sip-build: /home/talbert/wxPython/Phoenix.sip6/sip/gen/_richtext.sip: line 
20 column 36: '_' is unexpected
/home/talbert/wxPython/Phoenix.sip6/sip/gen/_richtext.sip: line 20 column 
38: 'Style Organiser' is unexpected

There are a bunch of other errors that follow in the real .sip files but I 
presume they're all because _(xxxx) isn't understood and the rest of the 
file isn't parsed correctly.

Thanks,
Scott
-------------- next part --------------
%Module( name=wx._richtext,
         keyword_arguments="All",
         use_argument_names=True,
         all_raise_py_exception=True,
         language="C++")
{
    %AutoPyName(remove_leading="wx")
};

class wxRichTextStyleOrganiserDialog
{

public:
    wxRichTextStyleOrganiserDialog(
        int flags,
        wxRichTextStyleSheet * sheet,
        wxRichTextCtrl * ctrl,
        wxWindow * parent,
        wxWindowID id = wxID_ANY,
        const wxString & caption = _("Style Organiser"),
        const wxPoint & pos = wxDefaultPosition,
        const wxSize & size = wxDefaultSize,
        long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
    );
};


More information about the PyQt mailing list