Skip to content

Commit

Permalink
embedding: cef_string_list_copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Blumenkrantz committed Oct 15, 2014
1 parent 04020d2 commit 31db638
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ports/cef/string_list.rs
Expand Up @@ -72,3 +72,16 @@ extern "C" fn cef_string_list_free(lt: *mut cef_string_list_t) {
drop(v);
}
}

#[no_mangle]
extern "C" fn cef_string_list_copy(lt: *mut cef_string_list_t) -> *mut cef_string_list_t {
unsafe {
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 lt2 = cef_string_list_alloc();
for cs in v.iter() {
cef_string_list_append(lt2, mem::transmute((*cs)));
}
lt2
}
}

9 comments on commit 31db638

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from larsbergstrom
at zmike@31db638

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging zmike/servo/embedding-string_list = 31db638 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zmike/servo/embedding-string_list = 31db638 merged ok, testing candidate = df2e484

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from larsbergstrom
at zmike@31db638

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging zmike/servo/embedding-string_list = 31db638 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zmike/servo/embedding-string_list = 31db638 merged ok, testing candidate = afc144a

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = afc144a

Please sign in to comment.