auto merge of #3775 : zmike/servo/embedding-dead_code, r=jdm

fixes #3687 

r+ @jdm @larsbergstrom ?
This commit is contained in:
bors-servo 2014-10-22 12:54:40 -06:00
commit bc1f610d97

View file

@ -11,7 +11,7 @@ use types::{cef_string_list_t,cef_string_t};
//cef_string_list //cef_string_list
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t { pub extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t {
unsafe { unsafe {
let lt: Box<Vec<*mut cef_string_t>> = box vec!(); let lt: Box<Vec<*mut cef_string_t>> = box vec!();
mem::transmute(lt) mem::transmute(lt)
@ -19,7 +19,7 @@ extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t {
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_size(lt: *const cef_string_list_t) -> c_int { pub extern "C" fn cef_string_list_size(lt: *const cef_string_list_t) -> c_int {
unsafe { unsafe {
if fptr_is_null(mem::transmute(lt)) { return 0; } if fptr_is_null(mem::transmute(lt)) { return 0; }
let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
@ -28,7 +28,7 @@ extern "C" fn cef_string_list_size(lt: *const cef_string_list_t) -> c_int {
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_append(lt: *mut cef_string_list_t, value: *const cef_string_t) { pub extern "C" fn cef_string_list_append(lt: *mut cef_string_list_t, value: *const cef_string_t) {
unsafe { unsafe {
if fptr_is_null(mem::transmute(lt)) { return; } if fptr_is_null(mem::transmute(lt)) { return; }
let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
@ -39,7 +39,7 @@ extern "C" fn cef_string_list_append(lt: *mut cef_string_list_t, value: *const c
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int, value: *mut cef_string_t) -> c_int { pub extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int, value: *mut cef_string_t) -> c_int {
unsafe { unsafe {
if index < 0 || fptr_is_null(mem::transmute(lt)) { return 0; } if index < 0 || fptr_is_null(mem::transmute(lt)) { return 0; }
let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
@ -50,7 +50,7 @@ extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int, va
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_clear(lt: *mut cef_string_list_t) { pub extern "C" fn cef_string_list_clear(lt: *mut cef_string_list_t) {
unsafe { unsafe {
if fptr_is_null(mem::transmute(lt)) { return; } if fptr_is_null(mem::transmute(lt)) { return; }
let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
@ -64,7 +64,7 @@ extern "C" fn cef_string_list_clear(lt: *mut cef_string_list_t) {
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_free(lt: *mut cef_string_list_t) { pub extern "C" fn cef_string_list_free(lt: *mut cef_string_list_t) {
unsafe { unsafe {
if fptr_is_null(mem::transmute(lt)) { return; } if fptr_is_null(mem::transmute(lt)) { return; }
let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let mut v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);
@ -74,7 +74,7 @@ extern "C" fn cef_string_list_free(lt: *mut cef_string_list_t) {
} }
#[no_mangle] #[no_mangle]
extern "C" fn cef_string_list_copy(lt: *mut cef_string_list_t) -> *mut cef_string_list_t { pub extern "C" fn cef_string_list_copy(lt: *mut cef_string_list_t) -> *mut cef_string_list_t {
unsafe { unsafe {
if fptr_is_null(mem::transmute(lt)) { return 0 as *mut cef_string_list_t; } if fptr_is_null(mem::transmute(lt)) { return 0 as *mut cef_string_list_t; }
let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt); let v: Box<Vec<*mut cef_string_t>> = mem::transmute(lt);