[api] Trim the type erased entry point comments

This commit is contained in:
J. Nick Koston
2026-09-07 15:24:32 +02:00
parent 4b46129fff
commit 7ad38d3e4c
2 changed files with 3 additions and 8 deletions
+1 -3
View File
@@ -2841,9 +2841,7 @@ def build_message_type(
)
for line in encode
]
# The body is a static function taking the message as const void *, so its address is
# already a MessageEncodeFn and callers need no per-type thunk. The member encode() below
# forwards to it for direct callers.
# Static over const void * so &T::encode_msg is a MessageEncodeFn without a thunk.
o = f"{speed_attr}uint8_t *{desc.name}::encode_msg(const void *self, ProtoWriteBuffer &buffer PROTO_ENCODE_DEBUG_PARAM) {{\n"
o += f" const auto &msg = *static_cast<const {desc.name} *>(self);\n"
o += " uint8_t *__restrict__ pos = buffer.get_pos();\n"