diff options
author | Alexandre Pion <pion@afnic.fr> | 2022-02-15 17:36:32 +0100 |
---|---|---|
committer | Alexandre Pion <pion@afnic.fr> | 2022-02-15 17:36:32 +0100 |
commit | 2e564b8eee5de22e202d98ceee5b0425bd526e85 (patch) | |
tree | cd12cb2c67771173dc49f40be5f14dd133b6b025 | |
parent | 8771f31146a84101c8a0a19e579acdd728bf7953 (diff) |
Convert to the IDN2 API
https://libidn.gitlab.io/libidn2/manual/libidn2.html#Converting-from-libidn
-rw-r--r-- | src/LDNS.xs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LDNS.xs b/src/LDNS.xs index f2e8c98..1144eb1 100644 --- a/src/LDNS.xs +++ b/src/LDNS.xs @@ -18,8 +18,8 @@ to_idn(...) if (SvPOK(ST(i))) { - status = idna_to_ascii_8z(SvPVutf8_nolen(obj), &out, IDNA_ALLOW_UNASSIGNED); - if (status == IDNA_SUCCESS) + status = idn2_to_ascii_8z(SvPVutf8_nolen(obj), &out, IDN2_ALLOW_UNASSIGNED); + if (status == IDN2_OK) { SV *new = newSVpv(out,0); SvUTF8_on(new); /* We know the string is plain ASCII, so let Perl know too */ @@ -28,7 +28,7 @@ to_idn(...) } else { - croak("Error: %s\n", idna_strerror(status)); + croak("Error: %s\n", idn2_strerror(status)); } } } |