Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ref

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ref - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

13

History.md
0.0.6 / 2012-05-09
==================
- add `alignof` mappings for the types
- add an `Object` type
- set the `alignment` property on the built-in types
0.0.5 / 2012-05-09
==================
- quickly add get() and set() functions
- use the `PRId64` and `PRIu64` snprintf types
0.0.4 / 2012-05-08

@@ -3,0 +16,0 @@ ==================

@@ -360,2 +360,12 @@

}
exports.types.Object = {
size: exports.sizeof.Object
, indirection: 1
, get: function get (buf, offset) {
return buf.readObject(offset || 0)
}
, set: function set (buf, offset, val) {
return buf.writeObject(val, offset || 0)
}
}

@@ -376,3 +386,10 @@ // "typedef"s for the variable-sized types

// set the "alignment" property on the built-in types
Object.keys(exports.alignof).forEach(function (name) {
if (name === 'pointer') return
exports.types[name].alignment = exports.alignof[name]
assert(exports.types[name].alignment > 0)
})
/**

@@ -379,0 +396,0 @@ * NULL_POINTER is essentially:

2

package.json

@@ -19,3 +19,3 @@ { "name": "ref"

]
, "version": "0.0.5"
, "version": "0.0.6"
, "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)"

@@ -22,0 +22,0 @@ , "repository": { "type": "git", "url": "git://github.com/TooTallNate/ref.git" }

@@ -176,2 +176,4 @@ ref

setting a value to a buffer instance.
* `alignment` - (optional) - Numer - The alignment of this type when placed in
a struct

@@ -178,0 +180,0 @@ For example, you could define a "bigint" type that dereferences into a

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc