-/* This won't work for 5.9.3 (5.9.4 ?), neither will the previous one.
- * If you want to bleed, upgrade your blead! */
+# if PERL_REVISION >= 5 && PERL_VERSION >= 9 && PERL_SUBVERSION >= 3
+/* From perl-5.9.3 (#24802), the key is only a SVt_PV and one can get the hash
+ * value with the SvSHARED_HASH() macro. */
+# define LS_HASH(K) SvSHARED_HASH(LS_KEY(K))
+# else
+/* Before, the key was a SVt_PVIV and the hash was stored in the UV field. */
+# define LS_HASH(K) SvUVX(LS_KEY(K))
+# endif