develooper Front page | perl.perl5.porters | Postings from January 2018

Re: CvNAME_HEK_set() - public API?

Thread Previous | Thread Next
Paul "LeoNerd" Evans
January 25, 2018 14:57
Re: CvNAME_HEK_set() - public API?
Message ID:
On Wed, 24 Jan 2018 02:05:26 +0000
"Paul \"LeoNerd\" Evans" <> wrote:

> I also notice that it doesn't work. Its definition calls
> `unshare_hek()`, which embed.h only defines inside #ifdef PERL_CORE,
> meaning it's not visible to XS users. If I simply steal the one-line
>   #define unshare_hek(a)          Perl_unshare_hek(aTHX_ a)
> then it appears to work fine, but it makes me feel cautious.

Update: it only appears to work fine on ELF-based platforms, because
the symbol Perl_unshare_hek() is necessarily visible. On e.g. MSWin32
it isn't, and it fails linking:

  lib\Future\AsyncAwait.o:AsyncAwait.c:(.text+0x2790): undefined
  reference to `_imp__Perl_unshare_hek'

I notice that embed.fnc declares this without A or X flags:

  p       |void   |unshare_hek    |NULLOK HEK* hek

What are my options here?

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About