mirror of
https://github.com/servo/servo.git
synced 2025-07-13 10:23:40 +01:00
embedding: cef_string_map_clear()
This commit is contained in:
parent
903c6f40f6
commit
37edcdcdde
1 changed files with 13 additions and 0 deletions
|
@ -110,3 +110,16 @@ pub extern "C" fn cef_string_map_value(sm: *mut cef_string_map_t, index: c_int,
|
|||
}
|
||||
0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn cef_string_map_clear(sm: *mut cef_string_map_t) {
|
||||
unsafe {
|
||||
if fptr_is_null(mem::transmute(sm)) { return; }
|
||||
let v = string_map_to_treemap(sm);
|
||||
if (*v).len() == 0 { return; }
|
||||
for val in (*v).values() {
|
||||
cef_string_userfree_utf8_free((*val));
|
||||
}
|
||||
(*v).clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue