Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable all typed array function #135

Merged
merged 1 commit into from Feb 19, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -25,13 +25,38 @@ pub fn JS_WrapPropertyDescriptor(cx: *mut JSContext,

pub mod bindgen {
use jsapi::{JSContext, JSObject, JSClass, JSRuntime};
use libc::{uintptr_t, uint8_t, uint32_t};
use libc::{uintptr_t, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, c_float, c_double};

extern {
pub fn JS_NewObjectWithUniqueType(cx: *mut JSContext, clasp: *const JSClass,
proto: *const JSObject, parent: *const JSObject) -> *mut JSObject;
pub fn JS_GetAddressableObject(rt: *mut JSRuntime, candidateObj: uintptr_t) -> *mut JSObject;

pub fn JS_NewInt8Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetInt8ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut int8_t;

pub fn JS_NewUint8Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetUint8ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut uint8_t;

pub fn JS_NewUint8ClampedArray(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetUint8ClampedArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut uint8_t;

pub fn JS_NewInt16Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetInt16ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut int16_t;

pub fn JS_NewUint16Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetUint16ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut uint16_t;

pub fn JS_NewInt32Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetInt32ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut int32_t;

pub fn JS_NewUint32Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetUint32ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut uint32_t;

pub fn JS_NewFloat32Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetFloat32ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut c_float;

pub fn JS_NewFloat64Array(cx: *mut JSContext, nelements: uint32_t) -> *mut JSObject;
pub fn JS_GetFloat64ArrayData(obj: *mut JSObject, cx: *mut JSContext) -> *mut c_double;
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.