Skip to content

Commit

Permalink
dl_win32.xs: can't assign literal to "char *"
Browse files Browse the repository at this point in the history
This generated code like:

        char *	filename;

	if (items < 3)
	    filename = "DynaLoader";
	else {
	    filename = (char *)SvPV_nolen(ST(2))

which failed in C++ builds (and isn't valid in C either), when
assigning a "const char *" (well, "const char [11]") to "char *".
  • Loading branch information
tonycoz authored and Leont committed May 24, 2023
1 parent ff3529a commit 3b4552b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/DynaLoader/dl_win32.xs
Expand Up @@ -188,7 +188,7 @@ void
dl_install_xsub(perl_name, symref, filename="$Package")
char * perl_name
void * symref
char * filename
const char * filename
CODE:
DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_install_xsub(name=%s, symref=%x)\n",
perl_name, symref));
Expand Down

0 comments on commit 3b4552b

Please sign in to comment.