Commit 07341a29 authored by Tom Lane's avatar Tom Lane

Update PL/Perl's comment about hv_store().

Negative klen is documented since Perl 5.16, and 5.6 is no longer
supported so no need to comment about it.

Dagfinn Ilmari Mannsåker
parent f3f3aae4
...@@ -3907,10 +3907,8 @@ hv_store_string(HV *hv, const char *key, SV *val) ...@@ -3907,10 +3907,8 @@ hv_store_string(HV *hv, const char *key, SV *val)
hkey = pg_server_to_any(key, strlen(key), PG_UTF8); hkey = pg_server_to_any(key, strlen(key), PG_UTF8);
/* /*
* This seems nowhere documented, but under Perl 5.8.0 and up, hv_store() * hv_store() recognizes a negative klen parameter as meaning a UTF-8
* recognizes a negative klen parameter as meaning a UTF-8 encoded key. It * encoded key.
* does not appear that hashes track UTF-8-ness of keys at all in Perl
* 5.6.
*/ */
hlen = -(int) strlen(hkey); hlen = -(int) strlen(hkey);
ret = hv_store(hv, hkey, hlen, val, 0); ret = hv_store(hv, hkey, hlen, val, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment