In most (cases functions returning a PyObject pointer requires it to be used by the caller, declare functions in the Python API with the `nodiscard` attribute.
typedef struct
generic
NOTE: `bgl.h` was left unchanged, as it is deprecated code anyway, and its conversion to C++ does not seem immediately trivial.