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 578355 - g_listenv isn't wrapped
g_listenv isn't wrapped
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: general
2.19.x
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-04-08 09:46 UTC by Daniel Macks
Modified: 2010-04-23 05:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Wrap up g_listenv() (1.98 KB, patch)
2010-04-17 06:29 UTC, Alex Vallée
none Details | Review

Description Daniel Macks 2009-04-08 09:46:10 UTC
(spawned from Bug #465129)

Nope, it's not. glib's gutils.h has environment-handlers g_getenv g_setenv g_unsetenv g_listenv, but glibmm's miscutils.h only provides wrappers for g_getenv g_setenv g_unsetenv. Seems like there ought to be a complete/consistent set of wrappers.
Comment 1 Murray Cumming 2010-03-26 09:57:17 UTC
A patch would be welcome.
Comment 2 Alex Vallée 2010-04-17 06:29:16 UTC
Created attachment 158938 [details] [review]
Wrap up g_listenv()

Wrapped up g_listenv() into Glib::listenv().
Comment 3 Jonathon Jongsma 2010-04-22 03:45:16 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 4 Jonathon Jongsma 2010-04-22 03:45:32 UTC
Oh, and also, thank you for the patch :)
Comment 5 Murray Cumming 2010-04-22 06:46:04 UTC
I wonder if that should use Glib::ustring instead of std::string. The documentation says "the UTF-8 encoding that this function and getenv() provide"

However, the existing methods already use std::string, so I guess we should keep it consistent.
Comment 6 Alex Vallée 2010-04-23 05:36:58 UTC
Yeah, so I spent a long time debating which one made more sense. The other environment functions returned std::string. However, g_strerror and g_strsignal, in the glib documentation, have the same return type description of UTF-8 encoded string as g_listenv().