diff --git a/pywayland/scanner/entry.py b/pywayland/scanner/entry.py index 0248880..b5aaee1 100644 --- a/pywayland/scanner/entry.py +++ b/pywayland/scanner/entry.py @@ -62,8 +62,8 @@ def output(self, enum_name: str, printer: Printer) -> None: int(self.name) printer("{}_{} = {}".format(enum_name, self.name, value)) except ValueError: - if self.name == "name": - name = "name_" + if self.name in ("name", "async"): + name = self.name + "_" else: name = self.name printer("{} = {}".format(name, value))