mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
embedding: cef_string_list_size()
This commit is contained in:
parent
4d8ed45e7b
commit
ee8ef615a6
1 changed files with 9 additions and 0 deletions
|
@ -17,3 +17,12 @@ extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t {
|
||||||
mem::transmute(lt)
|
mem::transmute(lt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
extern "C" fn cef_string_list_size(lt: *const cef_string_list_t) -> c_int {
|
||||||
|
unsafe {
|
||||||
|
if fptr_is_null(mem::transmute(lt)) { return 0; }
|
||||||
|
let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
|
||||||
|
v.len() as c_int
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue