fix test
[m6w6/ext-psi] / tests / idn / idn.psi
1 // libidn
2 lib "idn";
3
4 #include <stdlib.h>
5 #include <idna.h>
6
7 function idn\utf8_to_ascii(string $host, string &$result, int $flags = 0) : int {
8 let output = &NULL;
9 let input = strval($host);
10 let flags = intval($flags);
11 set $result = to_string(*output);
12 return to_int(idna_to_ascii_8z);
13 free free(*output);
14 }
15
16 function idn\strerror(int $rc) : string {
17 return to_string(idna_strerror);
18 let rc = intval($rc);
19 }