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 C++ handlers and handler_data to subscribe #534

Merged

Commits on Aug 18, 2015

  1. Configuration menu
    Copy the full SHA
    f1d2773 View commit details
    Browse the repository at this point in the history
  2. Add C++ handlers and handler_data to subscribe

    Spark.function, Spark.subscribe and attachInterrupt can now take a pointer to a member and an instance to easily attach a callback to a C++ object.
    
    `spark_subscribe` did not save the data pointer to be passed to the `EventHandler` callback so I implemented the following solution:
    * Don't change the signature of any dynalib method
    * Save the handler data pointer in `FilteringEventHandler`
    * If the data pointer is non-null, call the handler with the extra data pointer (3 arguments)
    * If the data pointer is null, call the handler with 2 arguments
    
    This should be compatible with previous code.
    monkbroc committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    ec614e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54fcd90 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    593dc21 View commit details
    Browse the repository at this point in the history