On Thu, Jul 20, 2023 at 7:29 AM Richard W.M. Jones <rjo...@redhat.com> wrote:
> On Thu, Jul 20, 2023 at 02:20:59AM +0200, Kevin Kofler via devel wrote:
> > As I understand it, this function is included in the public (at least, it is
> > declared EXT, so it should not be hidden) PL_check array (several times, the
> > first time at index 2), so I believe something like:
> > #define Perl_ck_fun (PL_check[2])
> > should work.
>
> That seems possible, although it's a bit of a hack to misuse the array
> like this:
>
> https://github.com/Perl/perl5/blob/ccfa6b533228ad41e4dbc5576cd43081b8fd2a13/opcode.h#L1431
>
> I suppose if polymake is going to fiddle with Perl internals anyway,
> then why not.

Thank you very much, Kevin and Rich, for the hints.  I decided to see
if polymake could be made to work with perl 5.38.0 after all.  It
turns out that polymake calls quite a few functions that are now
hidden.  However, the function prototypes are still included in public
headers, so that did not become apparent until link time.  I have been
able to find pointers to most of them (mostly in PL_ppaddr).  A few
gave me some trouble:

Perl_keyword
Perl_list
Perl_save_pushptrptr
Perl_scalar
Perl_yyerror

For each of those, I included the upstream perl implementations
(nearly) verbatim in the polymake code.  Yuck.  But it seems to
"work".  I am now encountering the kinds of problems upstream would
have faced with perl 5.38.0 anyway, even without functions becoming
hidden.  For example, I just adapted the code to this change in
Perl_anoncode: https://github.com/Perl/perl5/pull/20290.  There are
probably more issues.  Whether all of them can be addressed remains to
be seen.  However, I will not orphan or retire any packages for now.
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to