Permalink
Browse files

Merge branch 'size_t' of https://github.com/wadey/node-ffi into wadey…

…-size_t
  • Loading branch information...
2 parents cdcb081 + 5d82798 commit 849f04f9c434b4e93601e53c0cbf6ff57b4cf512 @rbranson rbranson committed Nov 18, 2010
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
@@ -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)
# V8 and 64-bit Types
View
@@ -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
@@ -220,6 +220,9 @@ assert.ok(ptr.getULongLong() != 8 && ptr.getULongLong() > 0);
ptr.putULongLong(17);
assert.equal(17, ptr.getULongLong());
+ptr.putSizeT(18);
+assert.equal(18, ptr.getSizeT());
+
//////////////////////
var nullptr = new Pointer(0);

0 comments on commit 849f04f

Please sign in to comment.