Scanner should warn if enums start with a number
<aleksander> hey all! I have a enum type with some entries like QMI_NAS_RADIO_INTERFACE_5GNR; so the last chunk of the name starts with a number. In a python app using G-I, I cannot use Qmi.NasRadioInterface.5GNR though, because that 5GNR chunk errors out with "SyntaxError: invalid decimal literal". What should I do here? Fix the lib to avoid the enum chunk starting with a number? Or is there some other way to handle this?
<ebassi> aleksander: yes, you need to fix the enum
<Company> ebassi: could gi-scanner check for those?
<ebassi> We had to do the same with https://docs.gtk.org/gdk3/enum.EventType.html#2button_press
<ebassi> Company: it could
<ebassi> Maybe it does already, I have to check
<ebassi> Basically, it’s a language specific thing
<ebassi> Some languages don’t like it when an identifier starts with a number
<ebassi> C doesn’t like it either
<ebassi> But it also depends on how a language deals with enums
<Company> it makes sense to make introspection not like it
<ebassi> In the perl bindings, enums are stringified
<ebassi> So it doesn’t matter, for instance
<ebassi> But yes, the scanner should probably warn