Constify collect and lcopy strings in GTypeValueTable
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 7 Mar 2012 12:54:04 +0000 (12:54 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 6 Jul 2012 03:27:35 +0000 (23:27 -0400)
commit2a87010831db5d4c18905103e9e7d804546552bf
treecfc05eb99f6ed79040694ae10964f3e9b65324d0
parentab4cc22ba5d7a1a9ee72eaccd171ac1fc82bfb5c
Constify collect and lcopy strings in GTypeValueTable

This avoids warnings when creating idiomatic value tables, like:

  static const GTypeValueTable _clutter_shader_float_value_table = {
    clutter_value_init_shader_float,
    clutter_value_free_shader_float,
    clutter_value_copy_shader_float,
    clutter_value_peek_pointer,
    "ip",
    clutter_value_collect_shader_float,
    "pp",
    clutter_value_lcopy_shader_float
  };

Because the strings are literals. And, really: nobody should be using
allocated values for the collection and lcopy strings.

https://bugzilla.gnome.org/show_bug.cgi?id=671545
gobject/gtype.h
gobject/gvaluecollector.h