Codebase list libencode-perl / f84cb7f
applied 3 patches from jhi Dan Kogai 9 years ago
3 changed file(s) with 24 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
22 # $Id: Changes,v 2.64 2014/10/29 15:37:54 dankogai Exp dankogai $
33 #
44 $Revision: 2.64 $ $Date: 2014/10/29 15:37:54 $
5 ! Changes Encode.xs bin/enc2xs
6 "We cranked up the warnings in the core." from jhi
7 Message-Id: <54753674.6070909@iki.fi>
8
9 2.64 2014/10/29 15:37:54
510 ! t/utf8warnings.t MANIFEST
611 Retouch pull #26 so it works with perl < 5.14
712 ! Encode.pm
813 + t/utf8warnings.t
914 Pulled: Catch and re-issue utf8 warnings at a higher level
1015 https://github.com/dankogai/p5-encode/pull/26
11 + Encode.xs
16 ! Encode.xs
1217 Pulled: Validate continuations in the incremental UTF-X decoder
1318 https://github.com/dankogai/p5-encode/pull/25
1419
2020
2121 #define UNIMPLEMENTED(x,y) y x (SV *sv, char *encoding) { \
2222 Perl_croak_nocontext("panic_unimplemented"); \
23 PERL_UNUSED_VAR(sv); \
24 PERL_UNUSED_VAR(encoding); \
2325 return (y)0; /* fool picky compilers */ \
2426 }
2527 /**/
6668 call_failure(SV * routine, U8 * done, U8 * dest, U8 * orig)
6769 {
6870 /* Exists for breakpointing */
71 PERL_UNUSED_VAR(routine);
72 PERL_UNUSED_VAR(done);
73 PERL_UNUSED_VAR(dest);
74 PERL_UNUSED_VAR(orig);
6975 }
7076
7177
362368 if (strict && uv > PERL_UNICODE_MAX)
363369 ulen = (STRLEN) -1;
364370 #endif
365 if (ulen == -1) {
371 if (ulen == (STRLEN) -1) {
366372 if (strict) {
367373 uv = utf8n_to_uvuni(s, e - s, &ulen,
368374 UTF8_CHECK_ONLY | UTF8_ALLOW_NONSTRICT);
369 if (ulen == -1)
375 if (ulen == (STRLEN) -1)
370376 goto malformed_byte;
371377 goto malformed;
372378 }
506512 U8 *s;
507513 U8 *e;
508514 SV *dst;
509 bool renewed = 0;
510515 int check;
511516 CODE:
512517 {
567572 SV * obj
568573 CODE:
569574 {
575 PERL_UNUSED_VAR(obj);
570576 XSRETURN(1);
571577 }
572578
575581 SV * obj
576582 CODE:
577583 RETVAL = 0;
584 PERL_UNUSED_VAR(obj);
578585 OUTPUT:
579586 RETVAL
580587
676683 CODE:
677684 {
678685 /* encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); */
686 PERL_UNUSED_VAR(obj);
679687 ST(0) = &PL_sv_no;
680688 XSRETURN(1);
681689 }
688696 /* encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); */
689697 /* require_pv(PERLIO_FILENAME); */
690698
699 PERL_UNUSED_VAR(obj);
691700 eval_pv("require PerlIO::encoding", 0);
692701 SPAGAIN;
693702
700700 my $cpp = ($Config{d_cplusplus} || '') eq 'define';
701701 my $var = $^O eq 'MacOS' || $cpp ? 'extern' : 'static';
702702 my $const = $cpp ? '' : 'const';
703 print $fh "$var $const encpage_t $name\[",scalar(@{$a->{'Entries'}}),"];\n";
703 my $ccflags = $Config{ccflags};
704 if (defined $Config{ccwarnflags}) {
705 $ccflags .= " " . $Config{ccwarnflags};
706 }
707 my $count = $ccflags =~ /-Wc\+\+-compat/ ? '' : scalar(@{$a->{'Entries'}});
708 print $fh "$var $const encpage_t $name\[$count];\n";
704709 }
705710 $a->{'DoneStrings'} = 1;
706711 foreach my $b (@{$a->{'Entries'}})