cmake-js / fastcall

fastcall - Fast, dyncall based foreign function interface library for Node.js
https://www.npmjs.com/package/fastcall
Other
202 stars 14 forks source link

`int[4] IntArray4` declaration doesn't actually work #15

Closed gnunicorn closed 7 years ago

gnunicorn commented 7 years ago

Trying the example from the readme:

lib.array('int[4] IntArray4');

fails for me with:

assert.js:85
  throw new assert.AssertionError({
  ^
AssertionError: Invalid array definition format.
    at RefTypeParser._parseArray (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/RefTypeParser.js:143:9)
    at RefTypeParser._parseString (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/RefTypeParser.js:79:27)
    at RefTypeParser.parse (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/RefTypeParser.js:42:25)
    at Parser.parseRefType (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/Parser.js:47:35)
    at FastArray.RefTypeDefinition (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/RefTypeDefinition.js:35:31)
    at FastArray (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/FastArray.js:24:9)
    at Library.array (/home/ben/dev/safenet/safe_app_nodejs/node_modules/fastcall/lib/Library.js:159:24)
unbornchikken commented 7 years ago

Fixed as of v0.2.4. Sorry for the delay.

gnunicorn commented 7 years ago

@unbornchikken thanks for fixing that! Highly appreciated!