mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
Reserve memory for component and platform vectors (#9042)
This commit is contained in:
@@ -579,13 +579,13 @@ def new_Pvariable(id_: ID, *args: SafeExpType) -> Pvariable:
|
||||
return Pvariable(id_, rhs)
|
||||
|
||||
|
||||
def add(expression: Expression | Statement):
|
||||
def add(expression: Expression | Statement, prepend: bool = False):
|
||||
"""Add an expression to the codegen section.
|
||||
|
||||
After this is called, the given given expression will
|
||||
show up in the setup() function after this has been called.
|
||||
"""
|
||||
CORE.add(expression)
|
||||
CORE.add(expression, prepend)
|
||||
|
||||
|
||||
def add_global(expression: SafeExpType | Statement, prepend: bool = False):
|
||||
|
Reference in New Issue
Block a user