Sitelet https://github.com/node-ffi/node-ffi/pull/419
Skip to content

add support for exported variables - #419

Open
kcrt wants to merge 5 commits into
node-ffi:masterfrom
kcrt:exported-variables
Open

kcrt wants to merge 5 commits into
node-ffi:masterfrom
kcrt:exported-variables

Conversation

@kcrt

@kcrt kcrt commented Sep 22, 2017

Copy link
Copy Markdown

If paramTypes is undefined, ref to exported variable will be returned.
We can acquire value with deref().

const libxxx = ffi.Library("libxxx", {"exported_variable": ["int", void 0]})
console.log(libxxx.exported_variable.deref())

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.

4 participants