Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

expose the 'size_t' type.

  • Loading branch information...
commit 5d82798be9d67a314d694de500e1a6a65084eb97 1 parent ddba83d
@wadey wadey authored
Showing with 6 additions and 1 deletion.
  1. +1 −0  README.md
  2. +2 −1  lib/ffi.js
  3. +3 −0  test/test.js
View
1  README.md
@@ -65,6 +65,7 @@ In addition to the basic types, there are type aliases for common C types.
ulong unsigned long
longlong long long
ulonglong unsigned long long
+ size_t unsigned int (size is platform-dependent)
# LICENSE
View
3  lib/ffi.js
@@ -48,7 +48,8 @@ FFI.NON_SPECIFIC_TYPES = {
"long": "Long",
"ulong": "ULong",
"longlong": "LongLong",
- "ulonglong": "ULongLong"
+ "ulonglong": "ULongLong",
+ "size_t": "SizeT"
};
// The initial buffer size of string arguments
View
3  test/test.js
@@ -103,6 +103,9 @@ assert.equal(16, ptr.getLongLong());
ptr.putULongLong(17);
assert.equal(17, ptr.getULongLong());
+ptr.putSizeT(18);
+assert.equal(18, ptr.getSizeT());
+
//////////////////////
var nullptr = new Pointer(0);
Please sign in to comment.
Something went wrong with that request. Please try again.