[oden] Native Modules
This commit is contained in:
parent
3b02faf9b4
commit
c574fd8cb8
8 changed files with 453 additions and 79 deletions
|
|
@ -52,7 +52,9 @@ extern "C" {
|
|||
fn JS_MakeException_real() -> JSValue;
|
||||
fn JS_MakeNull_real() -> JSValue;
|
||||
fn JS_MakeUndefined_real() -> JSValue;
|
||||
fn JS_ValueGetPtr_real(v: JSValue) -> *mut ::std::os::raw::c_void;
|
||||
fn JS_VALUE_GET_PTR_real(v: JSValue) -> *mut ::std::os::raw::c_void;
|
||||
fn JS_VALUE_GET_INT_real(v: JSValue) -> ::std::os::raw::c_int;
|
||||
fn JS_VALUE_GET_BOOL_real(v: JSValue) -> ::std::os::raw::c_int;
|
||||
}
|
||||
|
||||
pub unsafe fn JS_ValueGetTag(v: JSValue) -> i32 {
|
||||
|
|
@ -228,6 +230,14 @@ pub unsafe fn JS_MakeUndefined() -> JSValue {
|
|||
JS_MakeUndefined_real()
|
||||
}
|
||||
|
||||
pub unsafe fn JS_ValueGetPtr(v: JSValue) -> *mut ::std::os::raw::c_void {
|
||||
JS_ValueGetPtr_real(v)
|
||||
pub unsafe fn JS_VALUE_GET_PTR(v: JSValue) -> *mut ::std::os::raw::c_void {
|
||||
JS_VALUE_GET_PTR_real(v)
|
||||
}
|
||||
|
||||
pub unsafe fn JS_VALUE_GET_INT(v: JSValue) -> ::std::os::raw::c_int {
|
||||
JS_VALUE_GET_INT_real(v)
|
||||
}
|
||||
|
||||
pub unsafe fn JS_VALUE_GET_BOOL(v: JSValue) -> ::std::os::raw::c_int {
|
||||
JS_VALUE_GET_BOOL_real(v)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,6 +137,15 @@ JSValue JS_MakeUndefined_real() {
|
|||
return JS_UNDEFINED;
|
||||
}
|
||||
|
||||
void *JS_ValueGetPtr_real(JSValue val) {
|
||||
void *JS_VALUE_GET_PTR_real(JSValue val) {
|
||||
return JS_VALUE_GET_PTR(val);
|
||||
}
|
||||
|
||||
int JS_VALUE_GET_INT_real(JSValue v) {
|
||||
return JS_VALUE_GET_INT(v);
|
||||
}
|
||||
|
||||
int JS_VALUE_GET_BOOL_real(JSValue v) {
|
||||
return JS_VALUE_GET_BOOL(v);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue