Blog

MY_CXT_KEY is no longer used by current Perl5 implementation

We met a strange bug around XS. https://github.com/gfx/p5-Mouse/issues/18

This issue does not appear on recent Perl5 implementations.

... I find the difference between olders and recent implementation. Then I found a comment in the perl.h.

* 1. #define MY_CXT_KEY to a unique string, e.g.
*    "DynaLoader::_guts" XS_VERSION
*    XXX in the current implementation, this string is ignored.

Hmm...!!! The change is this: http://perl5.git.perl.org/perl.git/commitdiff/f16dd614412ea67a8eb64bb09a88fccdbd9db6b6?hp=85ce96a160e902929b94338ada20cf46b265d595

> git describe --all f16dd614412ea67a8eb64bb09a88fccdbd9db6b6
tags/perl-5.9.2-2002-gf16dd61

The change is applied on 5.10.0.

Then, if you are using MY_CXT_KEY, you need to test on 5.8.x explicitly(If you want to support old 5.8.x).