Skip to content

Commit e8cc68c

Browse files
committed
Address Python ast deprecations that will be removed in 3.14
1 parent 51dda4b commit e8cc68c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scc/cheader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def eval_expr(expr):
5959
""" Eval and expression inside a #define using a suppart of python grammar """
6060

6161
def _eval(node):
62-
if isinstance(node, ast.Num):
63-
return node.n
62+
if isinstance(node, ast.Constant):
63+
return node.value
6464
elif isinstance(node, ast.BinOp):
6565
return OPERATORS[type(node.op)](_eval(node.left), _eval(node.right))
6666
elif isinstance(node, ast.UnaryOp):

0 commit comments

Comments
 (0)