File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -214,19 +214,19 @@ _PyPegen_parse_string(Parser *p, Token *t)
214
214
215
215
if (quote != '\'' && quote != '\"' ) {
216
216
PyErr_BadInternalCall ();
217
- return -1 ;
217
+ return NULL ;
218
218
}
219
219
/* Skip the leading quote char. */
220
220
s ++ ;
221
221
len = strlen (s );
222
222
if (len > INT_MAX ) {
223
223
PyErr_SetString (PyExc_OverflowError , "string to parse is too long" );
224
- return -1 ;
224
+ return NULL ;
225
225
}
226
226
if (s [-- len ] != quote ) {
227
227
/* Last quote char must match the first. */
228
228
PyErr_BadInternalCall ();
229
- return -1 ;
229
+ return NULL ;
230
230
}
231
231
if (len >= 4 && s [0 ] == quote && s [1 ] == quote ) {
232
232
/* A triple quoted string. We've already skipped one quote at
@@ -237,7 +237,7 @@ _PyPegen_parse_string(Parser *p, Token *t)
237
237
/* And check that the last two match. */
238
238
if (s [-- len ] != quote || s [-- len ] != quote ) {
239
239
PyErr_BadInternalCall ();
240
- return -1 ;
240
+ return NULL ;
241
241
}
242
242
}
243
243
@@ -251,7 +251,7 @@ _PyPegen_parse_string(Parser *p, Token *t)
251
251
RAISE_SYNTAX_ERROR (
252
252
"bytes can only contain ASCII "
253
253
"literal characters" );
254
- return -1 ;
254
+ return NULL ;
255
255
}
256
256
}
257
257
if (rawmode ) {
You can’t perform that action at this time.
0 commit comments