cpp
[m6w6/ext-psi] / tests / idn / idn.psi
index 1583680060fd7bf54d1987ee1a2b4ae0c3ea6368..b8f3602205127f09558c98358d76e43e100e0706 100644 (file)
@@ -1,7 +1,7 @@
-# libidn
+// libidn
 lib "idn";
 
-# IDNA errors
+// IDNA errors
 const int \IDNA_SUCCESS = 0;
 const int \IDNA_STRINGPREP_ERROR = 1;
 const int \IDNA_PUNYCODE_ERROR = 2;
@@ -15,21 +15,21 @@ const int \IDNA_CONTAINS_ACE_PREFIX = 8;
 const int \IDNA_ICONV_ERROR = 9;
 const int \IDNA_MALLOC_ERROR = 201;
 const int \IDNA_DLOPEN_ERROR = 202;
-# IDNA flags
+// IDNA flags
 const int \IDNA_ALLOW_UNASSIGNED = 1;
 const int \IDNA_USE_STD3_ASCII_RULES = 2;
 
 
-default int idna_to_ascii_8z(sint8 *host, sint8 **buffer, int flags);
+default int idna_to_ascii_8z(char *host, char **buffer, int flags);
 function idn\utf8_to_ascii(string $host, string &$result, int $flags = 0) : int {
        let buffer = &NULL;
        let host = strval($host);
        let flags = intval($flags);
        set $result = to_string(*buffer);
        return to_int(idna_to_ascii_8z);
-       free *buffer;
+       free free(*buffer);
 }
-default sint8 *idna_strerror(int rc);
+default char *idna_strerror(int rc);
 function idn\strerror(int $rc) : string {
        return to_string(idna_strerror);
        let rc = intval($rc);