only support HPy_VISIT with explicit arguments. tp_traverse and co. are one of the few slots, which will require bit more work when migrating to HPy anyway, so requiring the users to update HPy_VISIT calls may not be such an issue.
HPy_VISIT with one argument can easily generate nice compiler error suggesting what to do
HPy_VISIT would have two overloads:
HPy_VISIT(field) -- for ease of migration and as a convenience
HPy_VISIT(field, fun, arg) -- recommended variant, also allows different names
We have two options:
HPy_VISIT
with explicit arguments.tp_traverse
and co. are one of the few slots, which will require bit more work when migrating to HPy anyway, so requiring the users to updateHPy_VISIT
calls may not be such an issue.HPy_VISIT
with one argument can easily generate nice compiler error suggesting what to doHPy_VISIT
would have two overloads:HPy_VISIT(field)
-- for ease of migration and as a convenienceHPy_VISIT(field, fun, arg)
-- recommended variant, also allows different names