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

src: add context-aware helpers and init macro #21318

Closed

Commits on Jul 1, 2018

  1. src: add context-aware init macro and doc

    Introduces macro `NODE_MODULE_INIT()` which creates the boilerplate for
    a context-aware module which can be loaded multiple times via the
    special symbol mechanism.
    
    Additionally, provides an example of using the new macro to construct
    an addon which stores per-addon-instance data in a heap-allocated
    structure that gets passed to each binding, rather than in a collection
    of global static variables.
    
    Re: nodejs#21291 (comment)
    Gabriel Schulhof committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    e9a452b View commit details
    Browse the repository at this point in the history
  2. address review comments

    Gabriel Schulhof committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    a9d8063 View commit details
    Browse the repository at this point in the history
  3. document NODE_MODULE_INITIALIZER

    Gabriel Schulhof committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    9402ca1 View commit details
    Browse the repository at this point in the history