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

Introduce KALEIDOSCOPE_API_VERSION #270

Merged
merged 2 commits into from Jan 29, 2018
Merged

Introduce KALEIDOSCOPE_API_VERSION #270

merged 2 commits into from Jan 29, 2018

Commits on Dec 17, 2017

  1. Introduce KALEIDOSCOPE_API_VERSION

    As we guarantee backwards compatibility throughout a major version, it helps if
    we have that version available, so plugins / sketches can check if they are
    compatible, and issue a helpful error if they are not. As further convenience,
    defining `KALEIDOSCOPE_REQUIRED_API_VERSION` before including `Kaleidoscope.h`
    will result in a check being done by Kaleidoscope, and an error printed if it
    does not match the API shipped.
    
    Signed-off-by: Gergely Nagy <algernon@keyboard.io>
    algernon committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    5a1b453 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2017

  1. api-version: A better error message

    Use `static_assert` instead of `#error` to report an API mismatch, resulting in
    a much more informative error message.
    
    Thanks to @cdisselkoen for the request, and @noseglasses for the `static_assert`
    idea!
    
    Signed-off-by: Gergely Nagy <algernon@keyboard.io>
    algernon committed Dec 28, 2017
    Configuration menu
    Copy the full SHA
    78cc806 View commit details
    Browse the repository at this point in the history