File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -3003,6 +3003,14 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
3003
3003
3004
3004
PERL_ARGS_ASSERT_UTF8N_TO_UVCHR_MSGS ;
3005
3005
3006
+ /* Assume that isn't malformed; the vast majority of calls won't be */
3007
+ if (errors ) {
3008
+ * errors = 0 ;
3009
+ }
3010
+ if (msgs ) {
3011
+ * msgs = NULL ;
3012
+ }
3013
+
3006
3014
/* This dfa is fast. If it accepts the input, it was for a well-formed,
3007
3015
* non-problematic code point, which can be returned immediately.
3008
3016
* Otherwise we call a helper function to figure out the more complicated
@@ -3050,12 +3058,6 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
3050
3058
if (retlen ) {
3051
3059
* retlen = s - s0 + 1 ;
3052
3060
}
3053
- if (errors ) {
3054
- * errors = 0 ;
3055
- }
3056
- if (msgs ) {
3057
- * msgs = NULL ;
3058
- }
3059
3061
3060
3062
return uv ;
3061
3063
}
You can’t perform that action at this time.
0 commit comments