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
[PATCH] [DOCFIX] - DynaLoader references deprecated newXSUB #13212
Comments
From @wolfsageCreated by wolfsage@gmail.comThe DynaLoader documentation for dl_install_xsub says: This is simply a direct call to newXSUB(). It looks like newXSUB() was removed a long time ago. I've updated the doc This is simply a direct call to newXS()/newXS_flags(). Attached is the patch. Cheers, -- Matthew Horsfall (alh) Perl Info
|
From @wolfsage0001-Replace-reference-to-newXSUB-with-newXS.patchFrom 8e0f3b59235138c0fa6f2220a0184c85135a3b2d Mon Sep 17 00:00:00 2001
From: "Matthew Horsfall (alh)" <wolfsage@gmail.com>
Date: Thu, 29 Aug 2013 08:41:06 -0400
Subject: [PATCH] Replace reference to newXSUB with newXS.
newXSUB hasn't been around for a long time
---
ext/DynaLoader/DynaLoader_pm.PL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index c67b4ab..03d45d1 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -870,7 +870,7 @@ Syntax:
Create a new Perl external subroutine named $perl_name using $symref as
a pointer to the function which implements the routine. This is simply
-a direct call to newXSUB(). Returns a reference to the installed
+a direct call to newXS()/newXS_flags(). Returns a reference to the installed
function.
The $filename parameter is used by Perl to identify the source file for
--
1.7.9.5
|
From @nwc10On Thu, Aug 29, 2013 at 07:15:12AM -0700, Matthew Horsfall wrote:
Good catch.
win32 seems to be the only code using newXS(). newXS() And newXS_flags() This history of all this seems to be rather stranger than you might first commit 5fec647 Remove #ifdef DEPRECATED stuff: newXSUB, pp_entersubr, FREE_TMPS(). but it seems that nothing in DynaLoader ever used it. In the 5.000 docs say Most of DynaLoader's platform specific code switched over to newXS_flags() commit 77004de Fix bug in DynaLoader, which has been passing a filename in dynamic I'm wary of documenting exactly the current state, as I see that Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @wolfsageOn Fri, Aug 30, 2013 at 7:43 AM, Nicholas Clark <nick@ccl4.org> wrote:
How would we avoid the strlen call? It looks like newXS_len_flags() still needs the length of char * perl_name Thanks, -- Matthew Horsfall (alh) |
From @nwc10On Fri, Aug 30, 2013 at 08:18:59AM -0400, Matthew Horsfall (alh) wrote:
Yes. The length is known, but being throw away by the XS typemap: void Change char *perl_name to SV *perl name, and one can get the length. Nicholas Clark |
From @wolfsageOn Fri, Aug 30, 2013 at 8:38 AM, Nicholas Clark <nick@ccl4.org> wrote:
Ah. I'd like to try my hand at patching that then. It *sounds* simple, unless -- Matthew Horsfall (alh) |
From @nwc10On Fri, Aug 30, 2013 at 08:45:42AM -0400, Matthew Horsfall (alh) wrote:
Well, I think that the least worst approach for now is to change perl_name Nicholas Clark |
From @cpansproutOn Fri Aug 30 04:43:57 2013, nicholas wrote:
No. newXS_len_flags is not API. -- Father Chrysostomos |
From @wolfsageOn Fri, Aug 30, 2013 at 11:20 AM, Father Chrysostomos via RT <
Should we add it to the api and save the strlen call, or forget it and Or is there another option? Thanks, -- Matthew Horsfall (alh) |
From @nwc10On Fri, Aug 30, 2013 at 12:45:20PM -0400, Matthew Horsfall (alh) wrote:
I don't know. I'm dithering. It's ugly, with too many parameters. But I think And what we have isn't on a hot path. Also, technically DynaLoader is the only thing outside of the top level Nicholas Clark |
From @cpansproutOn Fri Aug 30 09:56:19 2013, nicholas wrote:
Thank you. :-)
032a044 in November of 2011.
8f82b56 in the same month. The parameter list is absolutely awful for an API. I added that -- Father Chrysostomos |
From @tonycozOn Thu Aug 29 07:15:12 2013, alh wrote:
Thanks, applied as 6114e45. The other discussion here might need a new ticket, leaving this open (for now.) Tony |
Migrated from rt.perl.org#119515 (status was 'open')
Searchable as RT119515$
The text was updated successfully, but these errors were encountered: