From: Dr. Michael Lauer Date: Sat, 24 Mar 2018 10:38:17 +0000 (+0100) Subject: posix: Add to_string to NLItem and add NLTime X-Git-Tag: 0.41.90~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea38039a33ca66f51f47315f4da2c330e4a8fd19;p=thirdparty%2Fvala.git posix: Add to_string to NLItem and add NLTime Patch based on https://github.com/elementary/calendar/blob/master/vapi/posix-extension.vapi Note: NLTime is actually a glibc'ism, but in the absence of a glibc.vapi, posix.vapi is an acceptable place. See also bug #793443. --- diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 13a6c5d11..3ab41d9f4 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -3072,7 +3072,22 @@ namespace Posix { RADIXCHAR, THOUSEP, YESEXPR, - NOEXPR + NOEXPR; + [CCode (cheader_filename = "langinfo.h", cname = "nl_langinfo")] + public unowned string to_string (); + } + + [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "_NL_TIME_", has_type_id = false)] + public enum NLTime { + WEEK_NDAYS, + WEEK_1STDAY, + WEEK_1STWEEK, + FIRST_WEEKDAY, + FIRST_WORKDAY, + CAL_DIRECTION, + TIMEZONE; + [CCode (cheader_filename = "langinfo.h", cname = "nl_langinfo")] + public unowned string to_string (); } [CCode (cheader_filename = "langinfo.h")]