[glib/gobject-speedups: 3/6] Add G_PARAM_NO_VALIDATION
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gobject-speedups: 3/6] Add G_PARAM_NO_VALIDATION
- Date: Wed, 29 Sep 2021 11:29:12 +0000 (UTC)
commit 21da3ec10d845b9bd568331ae4063c5cb9513a47
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 29 01:19:06 2021 -0400
Add G_PARAM_NO_VALIDATION
This flag will be used to indicate that
g_param_value_validate will never change
a value for this pspec. That is the case
for all string properties, and it can be
safely set for boolean properties too. The
next commit will use this to speed up
setting of properties.
gobject/gparam.h | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gobject/gparam.h b/gobject/gparam.h
index 367d4760f..a1767bf53 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -134,6 +134,8 @@ G_BEGIN_DECLS
* parameter is guaranteed to remain valid and
* unmodified for the lifetime of the parameter.
* Since 2.8
+ * @G_PARAM_NO_VALIDATION: indicates that g_param_value_validate() will
+ * not change values for this parameter. Since 2.72
* @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this
* property will not automatically result in a "notify" signal being
* emitted: the implementation must call g_object_notify() themselves
@@ -162,6 +164,7 @@ typedef enum
G_PARAM_STATIC_NICK = 1 << 6,
G_PARAM_STATIC_BLURB = 1 << 7,
/* User defined flags go here */
+ G_PARAM_NO_VALIDATION = 1 << 29,
G_PARAM_EXPLICIT_NOTIFY = 1 << 30,
/* Avoid warning with -Wpedantic for gcc6 */
G_PARAM_DEPRECATED = (gint)(1u << 31)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]