[gimp/wip/nielsdg/g-config-param-static-strings: 27/27] libgimpconfig: Ensure G_PARAM_STATIC_STRINGS



commit aefb40c82a6806c509bcec81754b88e48364672a
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Aug 9 07:42:31 2019 +0200

    libgimpconfig: Ensure G_PARAM_STATIC_STRINGS
    
    The `GIMP_CONFIG_PROP_*` macros do not automatically set
    `G_PARAM_STATIC_STRINGS`, which means each property that uses such a
    macro does not have this flag set by default (and almost none set it
    themselves). By adding `G_PARAM_STATIC_STRINGS` to
    `GIMP_CONFIG_PARAM_FLAGS`, we can prevent this from happening, which
    should lead to some unnecessary string copies being prevented.

 libgimpconfig/gimpconfig-params.h | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/libgimpconfig/gimpconfig-params.h b/libgimpconfig/gimpconfig-params.h
index 3f7704d82a..943b4d38d6 100644
--- a/libgimpconfig/gimpconfig-params.h
+++ b/libgimpconfig/gimpconfig-params.h
@@ -65,6 +65,7 @@ G_BEGIN_DECLS
 
 #define GIMP_CONFIG_PARAM_FLAGS (G_PARAM_READWRITE | \
                                  G_PARAM_CONSTRUCT | \
+                                 G_PARAM_STATIC_STRINGS | \
                                  GIMP_CONFIG_PARAM_SERIALIZE)
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]