Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: add va_args.h #9286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffro256
Copy link
Contributor

This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. This header adds a macro VA_ARGS_COMMAPREFIX which, when passed __VA_ARGS__, expands to , __VA_ARGS__ unless the length of __VA_ARGS__ is 0, in which case it expands to nothing. This macro is useful for passing/declaring optional function arguments.

This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. This header adds a macro `VA_ARGS_COMMAPREFIX`
which, when passed `__VA_ARGS__`, expands to `, __VA_ARGS__` unless the length of `__VA_ARGS__` is 0, in which case it expands to nothing. This
macro is useful for passing/declaring optional function arguments.
jeffro256 added a commit to jeffro256/monero that referenced this pull request Apr 11, 2024
This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. The changes to the serialization header allow clean passing
of extra arguments to field serialization in the DSL. This is used mainly to pass implied sizes of containers during deserialization to make the format more
compact. For example, if my object has two containers A & B which must be the same size, I can serialize only the size of container A. Then, during
deserialization, when I deserialize A, I can then use A's size to deserialize B.

Depends on monero-project#9286.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants