google-code-export / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

binary-b error #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
var ByteArray = require('binary-b').ByteArray;

produce an error:

TypeError: Cannot read property 'prototype' of undefined 
(/usr/local/Cellar/v8cgi/0.9.1/lib/binary-b.js:60) TypeError: Cannot read 
property 'prototype' of undefined at Object.

Maybe I am using it wrong ( some prerequisites?), but Buffer from binary module 
works.

Original issue reported on code.google.com by lechner....@gmail.com on 13 Oct 2011 at 10:14

GoogleCodeExporter commented 9 years ago
The "binary-b" module (as well as "binary") is a "hybrid" module: it has a JS 
implementation and a C++ counterpart. Both must be available in order to use it.

The issue you see is caused by the fact that the C++ part of binary-b is not 
available, e.g. was not compiled. The trouble here is that there is no offical 
way to compile binary-b, as the SConstruct defines compilation only for 
"binary" module.

As a bugfix, I will add a "binary-b=1" option to SConstruct so that people can 
try binary-b as well. Note, however, that all components of v8cgi that need to 
manipulate binary data will still use "binary" instead of "binary-b".

Original comment by ondrej.zara on 13 Oct 2011 at 3:36

GoogleCodeExporter commented 9 years ago
binary_b=1 commited in r977.

Original comment by ondrej.zara on 14 Dec 2011 at 12:57