mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Add mostly-correct (albeit leaky) string marshaling
This commit is contained in:
parent
14ef53cf57
commit
1ac5bfe830
34 changed files with 175 additions and 147 deletions
|
@ -261,7 +261,7 @@ impl CefResponse {
|
|||
//
|
||||
// Set the response status text.
|
||||
//
|
||||
pub fn set_status_text(&self, statusText: &str) -> () {
|
||||
pub fn set_status_text(&self, statusText: &[u16]) -> () {
|
||||
if self.c_object.is_null() {
|
||||
panic!("called a CEF method on a null object")
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ impl CefResponse {
|
|||
//
|
||||
// Set the response mime type.
|
||||
//
|
||||
pub fn set_mime_type(&self, mimeType: &str) -> () {
|
||||
pub fn set_mime_type(&self, mimeType: &[u16]) -> () {
|
||||
if self.c_object.is_null() {
|
||||
panic!("called a CEF method on a null object")
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ impl CefResponse {
|
|||
// Get the value for the specified response header field.
|
||||
//
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
pub fn get_header(&self, name: &str) -> String {
|
||||
pub fn get_header(&self, name: &[u16]) -> String {
|
||||
if self.c_object.is_null() {
|
||||
panic!("called a CEF method on a null object")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue