Update Rust to 1.13.0-nightly (198713106 2016-08-26)

This commit is contained in:
Anthony Ramine 2016-08-26 16:49:47 +02:00
parent f4d3281a6a
commit c66380d83c
64 changed files with 1428 additions and 2636 deletions

View file

@ -161,8 +161,7 @@ pub struct CefCookieManager {
impl Clone for CefCookieManager {
fn clone(&self) -> CefCookieManager{
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.add_ref.unwrap())(&mut (*self.c_object).base);
}
CefCookieManager {
@ -175,8 +174,7 @@ impl Clone for CefCookieManager {
impl Drop for CefCookieManager {
fn drop(&mut self) {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.release.unwrap())(&mut (*self.c_object).base);
}
}
@ -191,8 +189,7 @@ impl CefCookieManager {
}
pub unsafe fn from_c_object_addref(c_object: *mut cef_cookie_manager_t) -> CefCookieManager {
if !c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if !c_object.is_null() {
((*c_object).base.add_ref.unwrap())(&mut (*c_object).base);
}
CefCookieManager {
@ -206,8 +203,7 @@ impl CefCookieManager {
pub fn c_object_addrefed(&self) -> *mut cef_cookie_manager_t {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
eutil::add_ref(self.c_object as *mut types::cef_base_t);
}
self.c_object
@ -215,10 +211,10 @@ impl CefCookieManager {
}
pub fn is_null_cef_object(&self) -> bool {
self.c_object.is_null() || self.c_object as usize == mem::POST_DROP_USIZE
self.c_object.is_null()
}
pub fn is_not_null_cef_object(&self) -> bool {
!self.c_object.is_null() && self.c_object as usize != mem::POST_DROP_USIZE
!self.c_object.is_null()
}
//
@ -229,8 +225,7 @@ impl CefCookieManager {
//
pub fn set_supported_schemes(&self, schemes: &Vec<String>,
callback: interfaces::CefCompletionCallback) -> () {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -249,8 +244,7 @@ impl CefCookieManager {
//
pub fn visit_all_cookies(&self,
visitor: interfaces::CefCookieVisitor) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -270,8 +264,7 @@ impl CefCookieManager {
//
pub fn visit_url_cookies(&self, url: &[u16], includeHttpOnly: libc::c_int,
visitor: interfaces::CefCookieVisitor) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -295,8 +288,7 @@ impl CefCookieManager {
//
pub fn set_cookie(&self, url: &[u16], cookie: &interfaces::CefCookie,
callback: interfaces::CefSetCookieCallback) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -322,8 +314,7 @@ impl CefCookieManager {
//
pub fn delete_cookies(&self, url: &[u16], cookie_name: &[u16],
callback: interfaces::CefDeleteCookiesCallback) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -349,8 +340,7 @@ impl CefCookieManager {
pub fn set_storage_path(&self, path: &[u16],
persist_session_cookies: libc::c_int,
callback: interfaces::CefCompletionCallback) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -370,8 +360,7 @@ impl CefCookieManager {
//
pub fn flush_store(&self,
callback: interfaces::CefCompletionCallback) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -436,8 +425,7 @@ impl CefWrap<*mut cef_cookie_manager_t> for Option<CefCookieManager> {
}
}
unsafe fn to_rust(c_object: *mut cef_cookie_manager_t) -> Option<CefCookieManager> {
if c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if c_object.is_null() {
None
} else {
Some(CefCookieManager::from_c_object_addref(c_object))
@ -493,8 +481,7 @@ pub struct CefCookieVisitor {
impl Clone for CefCookieVisitor {
fn clone(&self) -> CefCookieVisitor{
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.add_ref.unwrap())(&mut (*self.c_object).base);
}
CefCookieVisitor {
@ -507,8 +494,7 @@ impl Clone for CefCookieVisitor {
impl Drop for CefCookieVisitor {
fn drop(&mut self) {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.release.unwrap())(&mut (*self.c_object).base);
}
}
@ -523,8 +509,7 @@ impl CefCookieVisitor {
}
pub unsafe fn from_c_object_addref(c_object: *mut cef_cookie_visitor_t) -> CefCookieVisitor {
if !c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if !c_object.is_null() {
((*c_object).base.add_ref.unwrap())(&mut (*c_object).base);
}
CefCookieVisitor {
@ -538,8 +523,7 @@ impl CefCookieVisitor {
pub fn c_object_addrefed(&self) -> *mut cef_cookie_visitor_t {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
eutil::add_ref(self.c_object as *mut types::cef_base_t);
}
self.c_object
@ -547,10 +531,10 @@ impl CefCookieVisitor {
}
pub fn is_null_cef_object(&self) -> bool {
self.c_object.is_null() || self.c_object as usize == mem::POST_DROP_USIZE
self.c_object.is_null()
}
pub fn is_not_null_cef_object(&self) -> bool {
!self.c_object.is_null() && self.c_object as usize != mem::POST_DROP_USIZE
!self.c_object.is_null()
}
//
@ -562,8 +546,7 @@ impl CefCookieVisitor {
//
pub fn visit(&self, cookie: &interfaces::CefCookie, count: libc::c_int,
total: libc::c_int, deleteCookie: &mut libc::c_int) -> libc::c_int {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -594,8 +577,7 @@ impl CefWrap<*mut cef_cookie_visitor_t> for Option<CefCookieVisitor> {
}
}
unsafe fn to_rust(c_object: *mut cef_cookie_visitor_t) -> Option<CefCookieVisitor> {
if c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if c_object.is_null() {
None
} else {
Some(CefCookieVisitor::from_c_object_addref(c_object))
@ -647,8 +629,7 @@ pub struct CefSetCookieCallback {
impl Clone for CefSetCookieCallback {
fn clone(&self) -> CefSetCookieCallback{
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.add_ref.unwrap())(&mut (*self.c_object).base);
}
CefSetCookieCallback {
@ -661,8 +642,7 @@ impl Clone for CefSetCookieCallback {
impl Drop for CefSetCookieCallback {
fn drop(&mut self) {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.release.unwrap())(&mut (*self.c_object).base);
}
}
@ -677,8 +657,7 @@ impl CefSetCookieCallback {
}
pub unsafe fn from_c_object_addref(c_object: *mut cef_set_cookie_callback_t) -> CefSetCookieCallback {
if !c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if !c_object.is_null() {
((*c_object).base.add_ref.unwrap())(&mut (*c_object).base);
}
CefSetCookieCallback {
@ -692,8 +671,7 @@ impl CefSetCookieCallback {
pub fn c_object_addrefed(&self) -> *mut cef_set_cookie_callback_t {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
eutil::add_ref(self.c_object as *mut types::cef_base_t);
}
self.c_object
@ -701,10 +679,10 @@ impl CefSetCookieCallback {
}
pub fn is_null_cef_object(&self) -> bool {
self.c_object.is_null() || self.c_object as usize == mem::POST_DROP_USIZE
self.c_object.is_null()
}
pub fn is_not_null_cef_object(&self) -> bool {
!self.c_object.is_null() && self.c_object as usize != mem::POST_DROP_USIZE
!self.c_object.is_null()
}
//
@ -712,8 +690,7 @@ impl CefSetCookieCallback {
// the cookie was set successfully.
//
pub fn on_complete(&self, success: libc::c_int) -> () {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -741,8 +718,7 @@ impl CefWrap<*mut cef_set_cookie_callback_t> for Option<CefSetCookieCallback> {
}
}
unsafe fn to_rust(c_object: *mut cef_set_cookie_callback_t) -> Option<CefSetCookieCallback> {
if c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if c_object.is_null() {
None
} else {
Some(CefSetCookieCallback::from_c_object_addref(c_object))
@ -795,8 +771,7 @@ pub struct CefDeleteCookiesCallback {
impl Clone for CefDeleteCookiesCallback {
fn clone(&self) -> CefDeleteCookiesCallback{
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.add_ref.unwrap())(&mut (*self.c_object).base);
}
CefDeleteCookiesCallback {
@ -809,8 +784,7 @@ impl Clone for CefDeleteCookiesCallback {
impl Drop for CefDeleteCookiesCallback {
fn drop(&mut self) {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
((*self.c_object).base.release.unwrap())(&mut (*self.c_object).base);
}
}
@ -825,8 +799,7 @@ impl CefDeleteCookiesCallback {
}
pub unsafe fn from_c_object_addref(c_object: *mut cef_delete_cookies_callback_t) -> CefDeleteCookiesCallback {
if !c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if !c_object.is_null() {
((*c_object).base.add_ref.unwrap())(&mut (*c_object).base);
}
CefDeleteCookiesCallback {
@ -840,8 +813,7 @@ impl CefDeleteCookiesCallback {
pub fn c_object_addrefed(&self) -> *mut cef_delete_cookies_callback_t {
unsafe {
if !self.c_object.is_null() &&
self.c_object as usize != mem::POST_DROP_USIZE {
if !self.c_object.is_null() {
eutil::add_ref(self.c_object as *mut types::cef_base_t);
}
self.c_object
@ -849,10 +821,10 @@ impl CefDeleteCookiesCallback {
}
pub fn is_null_cef_object(&self) -> bool {
self.c_object.is_null() || self.c_object as usize == mem::POST_DROP_USIZE
self.c_object.is_null()
}
pub fn is_not_null_cef_object(&self) -> bool {
!self.c_object.is_null() && self.c_object as usize != mem::POST_DROP_USIZE
!self.c_object.is_null()
}
//
@ -860,8 +832,7 @@ impl CefDeleteCookiesCallback {
// number of cookies that were deleted or -1 if unknown.
//
pub fn on_complete(&self, num_deleted: libc::c_int) -> () {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
if self.c_object.is_null() {
panic!("called a CEF method on a null object")
}
unsafe {
@ -889,8 +860,7 @@ impl CefWrap<*mut cef_delete_cookies_callback_t> for Option<CefDeleteCookiesCall
}
}
unsafe fn to_rust(c_object: *mut cef_delete_cookies_callback_t) -> Option<CefDeleteCookiesCallback> {
if c_object.is_null() &&
c_object as usize != mem::POST_DROP_USIZE {
if c_object.is_null() {
None
} else {
Some(CefDeleteCookiesCallback::from_c_object_addref(c_object))