-
-
Notifications
You must be signed in to change notification settings - Fork 47
glib: fix ABI issues with macros/constants #135
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12890,32 +12890,6 @@ module.</doc> | |
| <doc xml:space="preserve">Multiplying the base 2 exponent by this number yields the base 10 exponent.</doc> | ||
| <type name="gdouble" c:type="gdouble"/> | ||
| </constant> | ||
| <constant name="LOG_DOMAIN" value="0" c:type="G_LOG_DOMAIN"> | ||
| <doc xml:space="preserve">Defines the log domain. See [Log Domains](#log-domains). | ||
|
|
||
| Libraries should define this so that any messages | ||
| which they log can be differentiated from messages from other | ||
| libraries and application code. But be careful not to define | ||
| it in any public header files. | ||
|
|
||
| Log domains must be unique, and it is recommended that they are the | ||
| application or library name, optionally followed by a hyphen and a sub-domain | ||
| name. For example, `bloatpad` or `bloatpad-io`. | ||
|
|
||
| If undefined, it defaults to the default %NULL (or `""`) log domain; this is | ||
| not advisable, as it cannot be filtered against using the `G_MESSAGES_DEBUG` | ||
| environment variable. | ||
|
|
||
| For example, GTK+ uses this in its `Makefile.am`: | ||
| |[ | ||
| AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\" | ||
| ]| | ||
|
|
||
| Applications can choose to leave it as the default %NULL (or `""`) | ||
| domain. However, defining the domain offers the same advantages as | ||
| above.</doc> | ||
| <type name="gchar" c:type="gchar"/> | ||
| </constant> | ||
| <constant name="LOG_FATAL_MASK" value="5" c:type="G_LOG_FATAL_MASK"> | ||
| <doc xml:space="preserve">GLib log levels that are considered fatal by default. | ||
|
|
||
|
|
@@ -13884,7 +13858,7 @@ levels using g_log_set_handler() and g_log_set_fatal_mask().</doc> | |
| <member name="level_debug" value="128" c:identifier="G_LOG_LEVEL_DEBUG"> | ||
| <doc xml:space="preserve">log level for debug messages, see g_debug()</doc> | ||
| </member> | ||
| <member name="level_mask" value="-4" c:identifier="G_LOG_LEVEL_MASK"> | ||
| <member name="level_mask" value="4294967292" c:identifier="G_LOG_LEVEL_MASK"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be fixed upstream? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have this problem with any flags type, we consider them u32 but in C anything in an enum has to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it looks like those annotations won't work on an enum constant, they only work on a |
||
| <doc xml:space="preserve">a mask including all log levels</doc> | ||
| </member> | ||
| </bitfield> | ||
|
|
@@ -45766,9 +45740,6 @@ application domain</doc> | |
| </parameter> | ||
| </parameters> | ||
| </function-macro> | ||
| <constant name="macro__has_attribute___noreturn__" value="0" c:type="g_macro__has_attribute___noreturn__"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the other constant |
||
| <type name="gint" c:type="gint"/> | ||
| </constant> | ||
| <function-macro name="macro__has_builtin" c:identifier="g_macro__has_builtin" introspectable="0"> | ||
| <parameters> | ||
| <parameter name="x"> | ||
|
|
||
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.
Instead this can be ignored in the Gir.toml file which will drop it from the ffi tests
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 tried that but couldn't get it to work, let me try again
Uh oh!
There was an error while loading. Please reload this page.
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.
we do that in gtk for the version constants for example