Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not support enum without name #116

Closed
hjklwrbhkysbdfyaejtrj opened this issue Oct 4, 2022 · 3 comments
Closed

do not support enum without name #116

hjklwrbhkysbdfyaejtrj opened this issue Oct 4, 2022 · 3 comments
Assignees

Comments

@hjklwrbhkysbdfyaejtrj
Copy link

hjklwrbhkysbdfyaejtrj commented Oct 4, 2022

do not support enum without name

enum
{
    FLUID_PRESET_SELECTED,                /**< Preset selected notify */
    FLUID_PRESET_UNSELECTED,              /**< Preset unselected notify */
    FLUID_SAMPLE_DONE,                    /**< Sample no longer needed notify */
    FLUID_PRESET_PIN,                     /**< Request to pin preset samples to cache */
    FLUID_PRESET_UNPIN                    /**< Request to unpin preset samples from cache */
};

typedef enum
{
    FLUID_MIDI_ROUTER_RULE_NOTE,                  /**< MIDI note rule */
    FLUID_MIDI_ROUTER_RULE_CC,                    /**< MIDI controller rule */
    FLUID_MIDI_ROUTER_RULE_PROG_CHANGE,           /**< MIDI program change rule */
    FLUID_MIDI_ROUTER_RULE_PITCH_BEND,            /**< MIDI pitch bend rule */
    FLUID_MIDI_ROUTER_RULE_CHANNEL_PRESSURE,      /**< MIDI channel pressure rule */
    FLUID_MIDI_ROUTER_RULE_KEY_PRESSURE,          /**< MIDI key pressure rule */
    FLUID_MIDI_ROUTER_RULE_COUNT                  /**< @internal Total count of rule types. This symbol
                                                    is not part of the public API and ABI stability
                                                    guarantee and may change at any time!*/
} fluid_midi_router_rule_type;

@hjklwrbhkysbdfyaejtrj
Copy link
Author

hjklwrbhkysbdfyaejtrj commented Oct 5, 2022

parse float *fx[] to ctypes.POINTER(ctypes.c_float) * 0
raise an error:
ctypes.ArgumentError: argument 4: <class 'TypeError'>: expected LP_c_float_Array_0 instance instead of LP_LP_c_float

change to ctypes.POINTER(ctypes.POINTER(ctypes.c_float)) fixed it

@trolldbois
Copy link
Owner

The enum seems to work.

@trolldbois
Copy link
Owner

I don't believe I can fix incomplete array within ctypeslib. Clang returns that as an incomplete type, with an incomplete type. It seems to me that it would be incorrect to change that to a pointer type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants