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

Use ffi-napi, ref-napi, and related Node.js NAPI packages #11

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Forked version of `ffi-generate`

Requires changes in [`libclang`](https://github.com/tjfontaine/node-libclang) to work properly.

- https://github.com/joelpurra/node-libclang/tree/ffi-napi

Use this version by [referencing the repository/branch in `package.json`](https://docs.npmjs.com/configuring-npm/package-json.html#github-urls) instead of the [official version published on npm](https://www.npmjs.com/package/ffi-generate).

---





`npm install -g ffi-generate`

Generate FFI Bindings
Expand Down
4 changes: 4 additions & 0 deletions lib/generateffi.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ exports.generate = function (opts) {
//console.error('mapType Record');
ret = defineType(type.declaration);
break;
case Type.Elaborated:
//console.error('mapType Elaborated', fieldname);
ret = mapType(type.namedType, fieldname);
break;
default:
//console.error(type.spelling);
ret = ffiMapType(type.kind);
Expand Down
Loading