GH-135379: Remove types from stack items in code generator. (GH-135384)

* Make casts explicit in the instruction definitions
This commit is contained in:
Mark Shannon 2025-06-11 15:52:25 +01:00 committed by GitHub
parent 49d72365cd
commit c87b5b2cb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 257 additions and 255 deletions

View file

@ -56,9 +56,7 @@ def root_relative_path(filename: str) -> str:
def type_and_null(var: StackItem) -> tuple[str, str]:
if var.type:
return var.type, "NULL"
elif var.is_array():
if var.is_array():
return "_PyStackRef *", "NULL"
else:
return "_PyStackRef", "PyStackRef_NULL"