diff options
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp b/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp index 98859da..16ee766 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp @@ -34,6 +34,10 @@ ArrayBuffer::ArrayBuffer(unsigned long length) { ArrayBuffer::ArrayBuffer(boost::shared_ptr<ArrayBuffer::Buffer> buffer) : _buffer(buffer) { } +ArrayBuffer::ArrayBuffer(void* data, unsigned int size) { + _buffer = boost::shared_ptr<Buffer>(new Buffer(data, size)); +} + unsigned long ArrayBuffer::getByteLength() { return _buffer->_size; } |