Skip to content

Commit

Permalink
Updated node-ffi bindings for the latest versions of ref and ref-struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Nov 18, 2012
1 parent 6853f3a commit a069c72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion r2-bindings/node-ffi/examples/asm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const r2 = require ('../r_asm');
var r2 = require('../r_asm');

/* Using the RAsm API */
function Assembler(arch, bits) {
Expand Down
8 changes: 4 additions & 4 deletions r2-bindings/node-ffi/examples/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ b.get_sections().forEach(function(x) {
console.log(' %s: size=%d vsize=%d rva=%d offset=%s srwx=%s',
x.name, x.size, x.vsize, x.rva,
x.offset.toString(16), x.srwx.toString(16));
});
});
console.log('Symbols:');
b.get_symbols().forEach (function(x) {
console.log (' %s: fw=%s bind=%s type=%s rva=%d offset=%s size=%d ordinal=%d',
x.name, x.forwarder, x.bind, x.type, x.rva,
x.offset.toString(16), x.size, x.ordinal);
});
});
console.log('Imports:');
b.get_imports().forEach(function(x) {
console.log(' %s: bind=%s type=%s rva=%d offset=%s ordinal=%d hint=%d',
x.name, x.bind, x.type, x.rva,
x.offset.toString(16), x.ordinal, x.hint);
});
});
console.log('Strings:');
b.get_strings().forEach(function(x) {
console.log(' %s rva=%d offset=%s ordinal=%d size=%d',
JSON.stringify(x.string), x.rva,
x.offset.toString(16), x.ordinal, x.size);
});
});
9 changes: 5 additions & 4 deletions r2-bindings/node-ffi/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ "name": "radare2.js",
{
"name": "radare2.js",
"version": "0.1.3",
"url": "http://www.radare.org",
"description": "radare2 valabind-ffi bindings for nodejs",
"dependencies": {
"ffi": "1.1.0",
"ref": "0.1.2",
"ref-struct": "0.0.3"
"ref-struct": "0.0.4",
"ref": "~0.1.3",
"ffi": "~1.2.0"
},
"files": [
"Makefile",
Expand Down

0 comments on commit a069c72

Please sign in to comment.