Bug #483 » 0003-generate_packets.py-always-transmit-new-elements-in-.patch
common/generate_packets.py | ||
---|---|---|
inner_cmp = prefix(" ", self.elem.get_code_cmp(sub))
|
||
index_put = prefix(" ", self.size.index_put(location.index))
|
||
index_put_sentinel = prefix(" ", self.size.index_put(self.size.real))
|
||
if not self.size.constant:
|
||
inner_cmp = f"""\
|
||
if ({location.index} < {self.size.old}) {{
|
||
{prefix(" ", inner_cmp)}\
|
||
}} else {{
|
||
/* Always transmit new elements */
|
||
differ = TRUE;
|
||
}}
|
||
"""
|
||
inner_put_full = prefix(" ", self.elem.get_code_put(sub, False))
|
||
if inner_put != inner_put_full:
|
||
inner_put = f"""\
|
||
if ({location.index} < {self.size.old}) {{
|
||
{prefix(" ", inner_put)}\
|
||
}} else {{
|
||
{prefix(" ", inner_put_full)}\
|
||
}}
|
||
"""
|
||
return f"""\
|
||
{self.size.size_check_index(location.name)}\
|
||
{{
|