Skip to content
  • Emmanuele Bassi's avatar
    gobject: Use from/to data naming convention · 8f8ce877
    Emmanuele Bassi authored
    Be more GLib-like, and use
    
      <namespace>_<type>_from_data()
      <namespace>_<type>_to_data()
    
    Instead of the homebrew "construct" and "serialize", when dealing
    with string buffers.
    
    This means:
    
      • adding json_gobject_from_data() to deprecate
        json_construct_gobject()
      • adding json_gobject_to_data() to deprecate
        json_serialize_gobject()
    
    The json_construct_gobject() function also contains a mistake: it
    uses gsize with the special value of -1 meaning "slurp the whole
    string", but gsize is an unsigned type. The newly added
    json_gobject_from_data() correctly uses gssize instead.
    8f8ce877