Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pad_alloc and fold_constants are not members of public API #9403

Closed
p5pRT opened this issue Jul 2, 2008 · 7 comments
Closed

pad_alloc and fold_constants are not members of public API #9403

p5pRT opened this issue Jul 2, 2008 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 2, 2008

Migrated from rt.perl.org#56536 (status was 'open')

Searchable as RT56536$

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2008

From dk@tetsuo.karasik.eu.org

Created by dk@tetsuo.karasik.eu.org

B​::Generate doesn't compile on MSWin32, requiring Perl_pad_alloc and
Perl_fold_constants in perl.dll. Here's a patch that exports these
function, and allows B​::Generate to be useful also on MSWin32.

Inline Patch
--- embed.fnc.0	2008-05-21 15:35:50.000000000 +0200
+++ embed.fnc	2008-07-02 20:35:36.000000000 +0200
@@ -276,7 +276,7 @@
 p	|char*	|find_script	|NN const char *scriptname|bool dosearch \
 				|NULLOK const char *const *const search_ext|I32 flags
 p	|OP*	|force_list	|NULLOK OP* arg
-p	|OP*	|fold_constants	|NN OP *o
+Ap	|OP*	|fold_constants	|NN OP *o
 Afpd	|char*	|form		|NN const char* pat|...
 Ap	|char*	|vform		|NN const char* pat|NULLOK va_list* args
 Ap	|void	|free_tmps
@@ -653,7 +653,7 @@
 #else
 p	|void	|package	|NN OP* o
 #endif
-pd	|PADOFFSET|pad_alloc	|I32 optype|U32 tmptype
+Apd	|PADOFFSET|pad_alloc	|I32 optype|U32 tmptype
 p	|PADOFFSET|allocmy	|NN const char *const name
 pdR	|PADOFFSET|pad_findmy	|NN const char* name
 Ap	|PADOFFSET|find_rundefsvoffset	|
Perl Info

Flags:
    category=core
    severity=medium


@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2008

From @rgs

2008/7/2 dk@​tetsuo.karasik.eu.org (via RT) <perlbug-followup@​perl.org>​:

B​::Generate doesn't compile on MSWin32, requiring Perl_pad_alloc and
Perl_fold_constants in perl.dll. Here's a patch that exports these
function, and allows B​::Generate to be useful also on MSWin32.

I think that it's OK for fold_constants() to go in the public API, but
the interface to pad_alloc() might change. Do you really need it, or
can't you export it just by tweaking makedef.pl instead ?

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 28, 2008

From @dk

I don't need these functions to be part of public API, I just need
B​::Generate to work on win32. I found the easiest way to do that was
hacking embed.fnc, I've also looked before at makedef.pl but got lost
there; you're welcome to rework the patch so embed.fnc stays intact, I
won't insist on the publicity of these functions.

@p5pRT
Copy link
Author

p5pRT commented Jul 28, 2008

From @dk

Wasn't that scary after all. Here's the patch that does it with
makedef.pl only​:

Inline Patch
--- makedef.pl.0	2007-12-18 11:47:08.000000000 +0100
+++ makedef.pl	2008-07-28 21:58:34.000000000 +0200
@@ -1219,6 +1219,8 @@
 			    Perl_thread_create
 			    Perl_win32_init
 			    Perl_win32_term
+			    Perl_pad_alloc
+			    Perl_fold_constants
 			    RunPerl
 			    win32_async_check
 			    win32_errno

@richardleach
Copy link
Contributor

The primary driver of this ticket was that B::Generate doesn't compile on Windows.

RURBAN/B-Generate-1.56.tar.gz has just installed perfectly happily for me on a copy of Strawberry Perl 5.28.2 on Windows 10.

@toddr
Copy link
Member

toddr commented Oct 21, 2019

Glad to hear. Thanks!

@toddr toddr closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants