Fix for ID 20010306.008, UTF-8 and \w without 'use utf8' coredump.
[p5sagit/p5-mst-13.2.git] / embed.pl
index a0b9476..f004e2c 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -29,6 +29,7 @@ sub walk_table (&@) {
        $F = $filename;
     }
     else {
+       unlink $filename;
        open F, ">$filename" or die "Can't open $filename: $!";
        $F = \*F;
     }
@@ -2093,9 +2094,12 @@ Apd      |U8*    |utf8_hop       |U8 *s|I32 off
 ApMd   |U8*    |utf8_to_bytes  |U8 *s|STRLEN *len
 ApMd   |U8*    |bytes_from_utf8|U8 *s|STRLEN *len|bool *is_utf8
 ApMd   |U8*    |bytes_to_utf8  |U8 *s|STRLEN *len
-Apd    |UV     |utf8_to_uv_simple|U8 *s|STRLEN* retlen
-Adp    |UV     |utf8_to_uv     |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
-Apd    |U8*    |uv_to_utf8     |U8 *d|UV uv
+Apd    |UV     |utf8_to_uvchr  |U8 *s|STRLEN* retlen
+Apd    |UV     |utf8_to_uvuni  |U8 *s|STRLEN* retlen
+Adp    |UV     |utf8n_to_uvchr |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
+Adp    |UV     |utf8n_to_uvuni |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
+Apd    |U8*    |uvchr_to_utf8  |U8 *d|UV uv
+Apd    |U8*    |uvuni_to_utf8  |U8 *d|UV uv
 p      |void   |vivify_defelem |SV* sv
 p      |void   |vivify_ref     |SV* sv|U32 to_what
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
@@ -2180,10 +2184,10 @@ Ap      |char*  |sv_2pvbyte_nolen|SV* sv
 Ap     |char*  |sv_pv          |SV *sv
 Ap     |char*  |sv_pvutf8      |SV *sv
 Ap     |char*  |sv_pvbyte      |SV *sv
-Apd      |void   |sv_utf8_upgrade|SV *sv
-ApdM      |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
-ApdM      |void   |sv_utf8_encode |SV *sv
-Ap      |bool   |sv_utf8_decode |SV *sv
+Apd    |STRLEN |sv_utf8_upgrade|SV *sv
+ApdM   |bool   |sv_utf8_downgrade|SV *sv|bool fail_ok
+Apd    |void   |sv_utf8_encode |SV *sv
+ApdM   |bool   |sv_utf8_decode |SV *sv
 Ap     |void   |sv_force_normal|SV *sv
 Ap     |void   |sv_force_normal_flags|SV *sv|U32 flags
 Ap     |void   |tmps_grow      |I32 n