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 690970 - Unhelpful deprecation message for g_value_array_get_nth
Unhelpful deprecation message for g_value_array_get_nth
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-01-02 00:56 UTC by Morten Welinder
Modified: 2013-01-03 15:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GValueArray: clarify the deprecation warnings (2.81 KB, patch)
2013-01-02 18:04 UTC, Dan Winship
committed Details | Review

Description Morten Welinder 2013-01-02 00:56:57 UTC
I get, for example,

dialog-doc-metadata.c: In function 'gnm_docprop_vector_as_string':
dialog-doc-metadata.c:531:3: warning: 'g_value_array_get_nth' is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:65): Use 'g_array_index' instead [-Wdeprecated-declarations]

...and it is not clear to me how g_array_index can replace g_value_array_get_nth.

If this is meant to be analog to GtkTable->GtkGrid then the deprecation
message should be similar.  If not, a sample would be appreciated.
Comment 1 Dan Winship 2013-01-02 18:04:14 UTC
Created attachment 232545 [details] [review]
GValueArray: clarify the deprecation warnings

GValueArray as a whole is deprecated in favor of GArray (with GValue
elements); warnings like "'g_value_array_get_nth' is deprecated: Use
'g_array_index' instead" are confusing because they suggest that the
GArray functions can be used with GValueArrays. Make them say "Use
'GArray' instead" instead.
Comment 2 Matthias Clasen 2013-01-03 00:58:24 UTC
Review of attachment 232545 [details] [review]:

sure
Comment 3 Matthias Clasen 2013-01-03 01:01:53 UTC
Review of attachment 232545 [details] [review]:

sure
Comment 4 Matthias Clasen 2013-01-03 01:02:03 UTC
Review of attachment 232545 [details] [review]:

sure
Comment 5 Dan Winship 2013-01-03 15:52:26 UTC
Attachment 232545 [details] pushed as 03e84f9 - GValueArray: clarify the deprecation warnings