X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Fstring.psi;h=824b7e336126f3196ac039146e61c612904cf221;hp=5ea4db4932c223abf33ee1c22929d9ec743edc02;hb=c0873cbbe9e5a83305adbc2bbd94aede5437f33d;hpb=974c9580535a1668dd6eed9992d582ebcc29b27a;ds=sidebyside diff --git a/psi.d/string.psi b/psi.d/string.psi index 5ea4db4..824b7e3 100644 --- a/psi.d/string.psi +++ b/psi.d/string.psi @@ -1,5 +1,6 @@ -extern char *strerror(int errno); +#include + function psi\strerror(int $errno) : string { - let errno = intval($errno); - return to_string(strerror); + let err = intval($errno); + return strerror(err) as to_string(strerror); }