Skip to content

Commit

Permalink
expose the 'size_t' type.
Browse files Browse the repository at this point in the history
  • Loading branch information
wadey committed Nov 17, 2010
1 parent ddba83d commit 5d82798
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion lib/ffi.js
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/test.js
Expand Up @@ -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);
Expand Down

0 comments on commit 5d82798

Please sign in to comment.