From db4499d7b40c1c216e3fa3b71f3aef8ee3f47d4e Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 19 Sep 2015 19:16:18 -0700 Subject: [PATCH] Fix new ctype lint in 1.3 --- core-foundation-sys/src/array.rs | 2 +- core-foundation-sys/src/bundle.rs | 2 +- core-foundation-sys/src/data.rs | 4 +++- core-foundation-sys/src/dictionary.rs | 2 +- core-foundation-sys/src/number.rs | 2 +- core-foundation-sys/src/runloop.rs | 6 +++--- core-foundation-sys/src/set.rs | 2 +- core-foundation-sys/src/string.rs | 4 ++-- core-foundation-sys/src/url.rs | 3 ++- 9 files changed, 15 insertions(+), 12 deletions(-) diff --git a/core-foundation-sys/src/array.rs b/core-foundation-sys/src/array.rs index 8fc5f69..910030d 100644 --- a/core-foundation-sys/src/array.rs +++ b/core-foundation-sys/src/array.rs @@ -34,7 +34,7 @@ pub struct CFArrayCallBacks { } #[repr(C)] -struct __CFArray; +struct __CFArray(c_void); pub type CFArrayRef = *const __CFArray; diff --git a/core-foundation-sys/src/bundle.rs b/core-foundation-sys/src/bundle.rs index 67edbd6..0999a83 100644 --- a/core-foundation-sys/src/bundle.rs +++ b/core-foundation-sys/src/bundle.rs @@ -13,7 +13,7 @@ use base::CFTypeID; use string::CFStringRef; #[repr(C)] -struct __CFBundle; +struct __CFBundle(c_void); pub type CFBundleRef = *const __CFBundle; diff --git a/core-foundation-sys/src/data.rs b/core-foundation-sys/src/data.rs index 5b47a62..0e333b5 100644 --- a/core-foundation-sys/src/data.rs +++ b/core-foundation-sys/src/data.rs @@ -1,7 +1,9 @@ +use libc::c_void; + use base::{CFAllocatorRef, CFTypeID, CFIndex}; #[repr(C)] -struct __CFData; +struct __CFData(c_void); pub type CFDataRef = *const __CFData; diff --git a/core-foundation-sys/src/dictionary.rs b/core-foundation-sys/src/dictionary.rs index bd2e8ce..daf22c7 100644 --- a/core-foundation-sys/src/dictionary.rs +++ b/core-foundation-sys/src/dictionary.rs @@ -42,7 +42,7 @@ pub struct CFDictionaryValueCallBacks { } #[repr(C)] -struct __CFDictionary; +struct __CFDictionary(c_void); pub type CFDictionaryRef = *const __CFDictionary; diff --git a/core-foundation-sys/src/number.rs b/core-foundation-sys/src/number.rs index ab1184e..31b91a0 100644 --- a/core-foundation-sys/src/number.rs +++ b/core-foundation-sys/src/number.rs @@ -12,7 +12,7 @@ use libc::c_void; use base::{CFAllocatorRef, CFTypeID}; #[repr(C)] -struct __CFBoolean; +struct __CFBoolean(c_void); pub type CFBooleanRef = *const __CFBoolean; diff --git a/core-foundation-sys/src/runloop.rs b/core-foundation-sys/src/runloop.rs index fc0e9c7..69d7579 100644 --- a/core-foundation-sys/src/runloop.rs +++ b/core-foundation-sys/src/runloop.rs @@ -15,17 +15,17 @@ use date::{CFAbsoluteTime, CFTimeInterval}; use string::CFStringRef; #[repr(C)] -struct __CFRunLoop; +struct __CFRunLoop(c_void); pub type CFRunLoopRef = *const __CFRunLoop; #[repr(C)] -struct __CFRunLoopSource; +struct __CFRunLoopSource(c_void); pub type CFRunLoopSourceRef = *const __CFRunLoopSource; #[repr(C)] -struct __CFRunLoopObserver; +struct __CFRunLoopObserver(c_void); pub type CFRunLoopObserverRef = *const __CFRunLoopObserver; diff --git a/core-foundation-sys/src/set.rs b/core-foundation-sys/src/set.rs index 9db6a37..e473da1 100644 --- a/core-foundation-sys/src/set.rs +++ b/core-foundation-sys/src/set.rs @@ -29,7 +29,7 @@ pub struct CFSetCallBacks { } #[repr(C)] -struct __CFSet; +struct __CFSet(c_void); pub type CFSetRef = *const __CFSet; diff --git a/core-foundation-sys/src/string.rs b/core-foundation-sys/src/string.rs index ed10a92..76655da 100644 --- a/core-foundation-sys/src/string.rs +++ b/core-foundation-sys/src/string.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc::{c_char, c_ushort}; +use libc::{c_char, c_ushort, c_void}; use base::{Boolean, CFOptionFlags, CFIndex, CFAllocatorRef, CFRange, CFTypeID}; @@ -188,7 +188,7 @@ pub type CFStringEncodings = CFIndex; //static kCFStringEncodingShiftJIS_X0213_00: CFStringEncoding = 0x0628; /* Deprecated */ #[repr(C)] -struct __CFString; +struct __CFString(c_void); pub type CFStringRef = *const __CFString; diff --git a/core-foundation-sys/src/url.rs b/core-foundation-sys/src/url.rs index abfe601..53fc456 100644 --- a/core-foundation-sys/src/url.rs +++ b/core-foundation-sys/src/url.rs @@ -6,12 +6,13 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +use libc::c_void; use base::{CFOptionFlags, CFIndex, CFAllocatorRef, Boolean, CFTypeID}; use string::CFStringRef; #[repr(C)] -struct __CFURL; +struct __CFURL(c_void); pub type CFURLRef = *const __CFURL;