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

Add macros to check for correct signal_emit params #954

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dwfreed
Copy link
Member

@dwfreed dwfreed commented Sep 30, 2018

This allows the compiler to throw an error if the params argument doesn't match the number of params provided after. Also fixes the issues the macros detected.

This allows the compiler to throw an error if the params argument
doesn't match the number of params provided after.
@ailin-nemui
Copy link
Contributor

will this cause any issues on solaris builds?

@ailin-nemui
Copy link
Contributor

if we cannot answer that, could we first commit 2df8357

@ahf
Copy link
Member

ahf commented Oct 8, 2018

Neat.

@dequis
Copy link
Member

dequis commented Oct 8, 2018

Hm, turning a public symbol into a macro is at least ABI breaking, not sure if it counts as API breaking too.

@dwfreed
Copy link
Member Author

dwfreed commented Oct 8, 2018

It's only API breaking if you're dumb enough to try to use the symbol in any other way besides calling it. But yes, it is ABI breaking. About to go to sleep, will bump the ABI number later (or somebody else can push that commit to my branch)

@ailin-nemui
Copy link
Contributor

we might be able to solve this better by using a signal registry and typed emissions

@dwfreed
Copy link
Member Author

dwfreed commented Nov 12, 2018

The current type system we have, for things like IS_SERVER, is a not-insignificant chunk of CPU time in my playback tests, which is why I've talked about getting rid of it on IRC. Also, that is a runtime check, whereas this is a compile-time check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants