-
Notifications
You must be signed in to change notification settings - Fork 574
add the new vstring API to Devel::PPPort #23160
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
Conversation
I think it also needs to be added to I've never been 100% sure of how that part works, but I suspect it needs to be set to |
Based on @Leont's comment on Perl#23160. This seems to produce reasonable results: tony@venus:.../git/perl6$ cat foo.c SvVSTRING tony@venus:.../git/perl6$ ./perl -Ilib dist/Devel-PPPort/ppport.h --nofilter foo.c Scanning foo.c ... === Analyzing foo.c === Uses SvVSTRING, which depends on sv_vstring_get, SvVSTRING_mg, mg_find, PERL_MAGIC_vstring, SvMAGICAL File needs sv_vstring_get, adding static request Needs to include 'ppport.h' Analysis completed Suggested changes: --- foo.c 2025-04-01 10:51:39.040415623 +1100 +++ foo.c.patched 2025-04-01 10:55:11.347014468 +1100 @@ -1 +1,3 @@ +#define NEED_sv_vstring_get +#include "ppport.h" SvVSTRING
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me (though I would squash the fixes)
A change I made caused this to fail, tracking it down was rough.
This is especially handy when tracking down problems with Devel::PPPort, since so much is generated.
vstrings were originally added in perl-5.8.0-82-g92f0c26562, SvVSTRING_mg() was originally added in perl-5.8.0-8018-gb0a11fe104 so technically in the same release. I expect there were some uses of intermediate versions 19 years ago, but I don't think we need to worry about it now.
Based on @Leont's comment on Perl#23160. This seems to produce reasonable results: tony@venus:.../git/perl6$ cat foo.c SvVSTRING tony@venus:.../git/perl6$ ./perl -Ilib dist/Devel-PPPort/ppport.h --nofilter foo.c Scanning foo.c ... === Analyzing foo.c === Uses SvVSTRING, which depends on sv_vstring_get, SvVSTRING_mg, mg_find, PERL_MAGIC_vstring, SvMAGICAL File needs sv_vstring_get, adding static request Needs to include 'ppport.h' Analysis completed Suggested changes: --- foo.c 2025-04-01 10:51:39.040415623 +1100 +++ foo.c.patched 2025-04-01 10:55:11.347014468 +1100 @@ -1 +1,3 @@ +#define NEED_sv_vstring_get +#include "ppport.h" SvVSTRING
996e27b
to
0a223ec
Compare
Adds the new vstring APIs to ppport.h
Also improves a Devel::PPPort test and extends
Porting/test-dist-modules.pl
to aid in development.