Skip to content

Commit 876683f

Browse files
review: move check before declaration
1 parent 1ca203e commit 876683f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Parser/lexer/lexer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ set_ftstring_expr(struct tok_state* tok, struct token *token, char c) {
119119
if (!(tok_mode->in_debug || tok_mode->string_kind == TSTRING) || token->metadata) {
120120
return 0;
121121
}
122-
PyObject *res = NULL;
123122

124123
Py_ssize_t expr_len = tok_mode->last_expr_size - tok_mode->last_expr_end;
125124
if (expr_len < 0) {
@@ -131,6 +130,8 @@ set_ftstring_expr(struct tok_state* tok, struct token *token, char c) {
131130
return -1;
132131
}
133132

133+
PyObject *res = NULL;
134+
134135
// Look for a # character outside of string literals
135136
int hash_detected = 0;
136137
int in_string = 0;

0 commit comments

Comments
 (0)