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

Re: CvNAME_HEK_set() - public API?

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
January 25, 2018 14:57
Subject:
Re: CvNAME_HEK_set() - public API?
Message ID:
20180125145712.2c88f3f6@shy.leonerd.org.uk
On Wed, 24 Jan 2018 02:05:26 +0000
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> 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

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About