After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682025 - Documentation correction
Documentation correction
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gvariant
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-08-16 16:56 UTC by Chandni Verma
Modified: 2012-08-17 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chandni Verma 2012-08-16 16:56:53 UTC
This seems to be an example with wrong usage of g_variant_get() contradicting its definition:

{
  const gchar *str;
  GVariant *value;

  value = g_variant_new ("&s", "hello world");
  str = g_variant_get ("&s", &str);
  g_print ("string is: %s\n", str);
  /* no need to free str */
}


..taken from the "Pointers" section of "GVariant Format Strings"
Comment 1 Matthias Clasen 2012-08-16 21:21:21 UTC
Thanks, Chandni - should be fixed now.
Comment 2 Chandni Verma 2012-08-17 18:45:32 UTC
You're welcome :)