diff --git a/ports/cef/string_list.rs b/ports/cef/string_list.rs index 9516c5b1848..74716e017d0 100644 --- a/ports/cef/string_list.rs +++ b/ports/cef/string_list.rs @@ -17,3 +17,12 @@ extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t { 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> = mem::transmute(lt); + v.len() as c_int + } +}