-
Notifications
You must be signed in to change notification settings - Fork 49
Add enum helper #47
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
Add enum helper #47
Conversation
To get all enum values for a specific enum.
Just noticed that there are some warnings in the Travis build:
Can we safely ignore those? |
Yes, they are harmless, I looked into them a while ago. They are hard to suppress, unfortunately. |
pyvips/base.py
Outdated
value = _to_string(ffi.string(g_enum_class.values[i].value_nick)) | ||
values.append(value) | ||
|
||
glib_lib.g_free(g_enum_class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we need this? g_type_class_ref()
results can usually just be left: extra refs on classes don't matter, since we never unload., and I think freeing them is not correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure about this one. Removed with jcupitt@d27b8e2.
Thanks!
Freeing isn't correct here.
Great! |
Similar to libvips#47, but for flags (e.g. VipsForeignPngFilter).
Similar to libvips#47, but for flags (e.g. VipsForeignPngFilter).
Similar to #47, but for flags (e.g. VipsForeignPngFilter).
Needed for: libvips/php-vips#72.
To get all enum values for a specific enum.