[vala/0.36: 152/212] posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return NULL.



commit 5e35293cede1e06772640a4f6c1d8ccce5e6299f
Author: Dr. Michael Lauer <mickey vanille-media de>
Date:   Tue Jan 16 16:50:26 2018 +0100

    posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return NULL.

 vapi/posix.vapi |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index 3472112..5afddbf 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1482,7 +1482,7 @@ namespace Posix {
        [CCode (cheader_filename = "netdb.h")]
        public unowned string gai_strerror (int errcode);
        [CCode (cheader_filename = "netdb.h")]
-       public unowned HostEnt gethostbyname (string name);
+       public unowned HostEnt? gethostbyname (string name);
 
        [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0", has_type_id = 
false)]
        public struct socklen_t : int {
@@ -1534,6 +1534,7 @@ namespace Posix {
                public AddrInfo *ai_next;
        }
 
+       [Compact]
        [CCode (cname = "struct hostent", cheader_filename = "netdb.h", destroy_function = "", has_type_id = 
false)]
        public class HostEnt {
                public string h_name;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]