mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
gobject: remove -DG_DISABLE_CONST_RETURNS
GObject had a few cases of depending on G_CONST_RETURN not being defined to 'const'. Remove those in preparation for deprecation of G_CONST_RETURN.
This commit is contained in:
parent
5794393c6f
commit
8f21e8145c
@ -18,8 +18,7 @@ AM_CPPFLAGS = \
|
||||
$(GLIB_DEBUG_FLAGS) \
|
||||
$(THREAD_FLAGS) \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGOBJECT_COMPILATION \
|
||||
-DG_DISABLE_CONST_RETURNS
|
||||
-DGOBJECT_COMPILATION
|
||||
|
||||
gobject.def: gobject.symbols
|
||||
$(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gobject.symbols | $(SED) -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gobject.def
|
||||
|
@ -151,8 +151,8 @@ struct _GBinding
|
||||
GObject *target;
|
||||
|
||||
/* the property names are interned, so they should not be freed */
|
||||
gchar *source_property;
|
||||
gchar *target_property;
|
||||
const gchar *source_property;
|
||||
const gchar *target_property;
|
||||
|
||||
GParamSpec *source_pspec;
|
||||
GParamSpec *target_pspec;
|
||||
|
@ -1148,7 +1148,7 @@ object_set_property (GObject *object,
|
||||
GObjectClass *class = g_type_class_peek (pspec->owner_type);
|
||||
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
|
||||
GParamSpec *redirect;
|
||||
static gchar* enable_diagnostic = NULL;
|
||||
static const gchar * enable_diagnostic = NULL;
|
||||
|
||||
if (class == NULL)
|
||||
{
|
||||
|
@ -421,7 +421,8 @@ g_param_spec_internal (GType param_type,
|
||||
|
||||
if (flags & G_PARAM_STATIC_NAME)
|
||||
{
|
||||
pspec->name = g_intern_static_string (name);
|
||||
/* pspec->name is not freed if (flags & G_PARAM_STATIC_NAME) */
|
||||
pspec->name = (gchar *) g_intern_static_string (name);
|
||||
if (!is_canonical (pspec->name))
|
||||
g_warning ("G_PARAM_STATIC_NAME used with non-canonical pspec name: %s", pspec->name);
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ type_node_any_new_W (TypeNode *pnode,
|
||||
node->global_gdata = NULL;
|
||||
|
||||
g_hash_table_insert (static_type_nodes_ht,
|
||||
g_quark_to_string (node->qname),
|
||||
(gpointer) g_quark_to_string (node->qname),
|
||||
(gpointer) type);
|
||||
return node;
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ test_signal_accumulator (GSignalInvocationHint *ihint,
|
||||
const GValue *handler_return,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *accu_string = g_value_get_string (return_accu);
|
||||
gchar *new_string = g_value_get_string (handler_return);
|
||||
const gchar *accu_string = g_value_get_string (return_accu);
|
||||
const gchar *new_string = g_value_get_string (handler_return);
|
||||
gchar *result_string;
|
||||
|
||||
if (accu_string)
|
||||
|
Loading…
Reference in New Issue
Block a user