mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
embedding: remove eutil::fptr_is_null, fix #3967, add Option<> to fptrs
This commit is contained in:
parent
85a2f0b66a
commit
d33f74f499
7 changed files with 213 additions and 222 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue