Skip to content

Commit

Permalink
PerlIO::encoding: explicitly cast char * to STDCHAR *
Browse files Browse the repository at this point in the history
This should avoid the "pointer targets in assignment differ in
signedness" warning that pops up in some configurations.
  • Loading branch information
mauke committed Jan 31, 2016
1 parent 259f5e0 commit 0bca550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext/PerlIO-encoding/encoding.pm
@@ -1,7 +1,7 @@
package PerlIO::encoding;

use strict;
our $VERSION = '0.23';
our $VERSION = '0.24';
our $DEBUG = 0;
$DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";

Expand Down
4 changes: 2 additions & 2 deletions ext/PerlIO-encoding/encoding.xs
Expand Up @@ -462,8 +462,8 @@ PerlIOEncode_flush(pTHX_ PerlIO * f)
if (!SvPOKp(e->bufsv) || SvTHINKFIRST(e->bufsv))
(void)SvPV_force_nolen(e->bufsv);
if ((STDCHAR *)SvPVX(e->bufsv) != e->base.buf) {
e->base.ptr = SvEND(e->bufsv);
e->base.end = SvPVX(e->bufsv) + (e->base.end-e->base.buf);
e->base.ptr = (STDCHAR *)SvEND(e->bufsv);
e->base.end = (STDCHAR *)SvPVX(e->bufsv) + (e->base.end-e->base.buf);
e->base.buf = (STDCHAR *)SvPVX(e->bufsv);
}
(void)PerlIOEncode_get_base(aTHX_ f);
Expand Down

0 comments on commit 0bca550

Please sign in to comment.