embedding: remove eutil::fptr_is_null, fix #3967, add Option<> to fptrs

This commit is contained in:
Mike Blumenkrantz 2014-11-14 14:26:00 -05:00
parent 85a2f0b66a
commit d33f74f499
7 changed files with 213 additions and 222 deletions

View file

@ -35,7 +35,7 @@ pub fn command_line_init(argc: c_int, argv: *const *const u8) {
let cl = command_line_new();
(*cl).argc = argc;
(*cl).argv = a;
(*cl).cl.get_switch_value = command_line_get_switch_value;
(*cl).cl.get_switch_value = Some(command_line_get_switch_value);
GLOBAL_CMDLINE = Some(cl);
}
}
@ -72,7 +72,7 @@ pub extern "C" fn command_line_get_switch_value(cmd: *mut cef_command_line_t, na
pub extern "C" fn cef_command_line_create() -> *mut cef_command_line_t {
unsafe {
let cl = command_line_new();
(*cl).cl.get_switch_value = command_line_get_switch_value;
(*cl).cl.get_switch_value = Some(command_line_get_switch_value);
mem::transmute(cl)
}
}