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 685039 - Add nl_langinfo() to libc bindings
Add nl_langinfo() to libc bindings
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 651672
 
 
Reported: 2012-09-28 12:56 UTC by Philip Withnall
Modified: 2013-11-08 00:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add nl_langinfo (1.45 KB, patch)
2012-11-08 01:55 UTC, Robert Ancell
committed Details | Review
posix: Fix cname of NLItem (839 bytes, patch)
2013-09-29 14:45 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2012-09-28 12:56:34 UTC
nl_langinfo() doesn’t currently appear to be bound:
http://pubs.opengroup.org/onlinepubs/009604599/functions/nl_langinfo.html
Comment 1 Robert Ancell 2012-10-13 00:15:41 UTC
The patch is reasonably easy to make (I am doing this for gcalctool) but I'm not sure what module this should go into. The man page for nl_langinfo says it is in POSIX so I was thinking posix.vapi, but the other locale settings are in glib-2.0.vapi. Let me know where it should go and I'll post a patch.
Comment 2 Jürg Billeter 2012-10-19 22:12:41 UTC
(In reply to comment #1)
> The patch is reasonably easy to make (I am doing this for gcalctool) but I'm
> not sure what module this should go into. The man page for nl_langinfo says it
> is in POSIX so I was thinking posix.vapi, but the other locale settings are in
> glib-2.0.vapi. Let me know where it should go and I'll post a patch.

The locale functions in glib-2.0.vapi are all either in GLib or ISO C but nl_langinfo is not, if I'm not mistaken. I would thus suggest to add the binding to posix.vapi. Thanks.
Comment 3 Robert Ancell 2012-11-08 01:55:14 UTC
Created attachment 228434 [details] [review]
Add nl_langinfo
Comment 4 Jürg Billeter 2012-11-11 14:25:27 UTC
commit 33f66e1e14058cf0f96b33e3ce882b6117cc22aa
Author: Robert Ancell <robert.ancell@canonical.com>
Date:   Thu Nov 8 14:50:56 2012 +1300

    posix: Add nl_langinfo
    
    Fixes 685039.
Comment 5 Philip Withnall 2013-09-29 14:45:36 UTC
Created attachment 256024 [details] [review]
posix: Fix cname of NLItem

This fixes the C type of variables of Vala type NLItem.

Closes:
Comment 6 Philip Withnall 2013-09-29 14:46:21 UTC
A tiny fix is needed to get NLItem working for variables, since its C type currently doesn’t exist (it’s ‘NLItem’ but should be ‘nl_item’).
Comment 7 Philip Withnall 2013-11-07 14:17:55 UTC
Ping.
Comment 8 Luca Bruno 2013-11-07 19:55:43 UTC
Review of attachment 256024 [details] [review]:

Ok as long as it's been tested. Thanks.
Comment 9 Philip Withnall 2013-11-08 00:49:45 UTC
Comment on attachment 256024 [details] [review]
posix: Fix cname of NLItem

commit 7c371598d60cadf7e93695c77f5e949598a66a5c
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Sep 29 15:35:07 2013 +0100

    posix: Fix cname of NLItem
    
    This fixes the C type of variables of Vala type NLItem.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=685039

 vapi/posix.vapi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)