Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding conversion API's for NSMutableArray<->CFMutableArrayRef and NS…

…Error<->CFErrorRef
  • Loading branch information...
commit a4f9ae2e4868d322702d17a2a27b8556365afa13 1 parent bfed390
@Machx authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 Source/CWCFConversionMacros.h
View
20 Source/CWCFConversionMacros.h
@@ -34,6 +34,16 @@ NS_INLINE CFArrayRef CWNSToCFArray(NSArray *array) {
return (CFArrayRef)array;
}
+/* NSMutableArray & CFMutableArrayRef */
+
+NS_INLINE NSMutableArray* CWCFToNSMutableArray(CFMutableArrayRef array) {
+ return (NSMutableArray *)array;
+}
+
+NS_INLINE CFMutableArrayRef CWNSToCFMutableArrayRef(NSMutableArray *array) {
+ return (CFMutableArrayRef)array;
+}
+
/* NSSet & CFSetRef */
NS_INLINE NSSet* CWCFToNSSet(CFSetRef set) {
@@ -73,3 +83,13 @@ NS_INLINE NSNumber* CWCFToNSNumber(CFNumberRef cfnumber) {
NS_INLINE CFNumberRef CWNSToCFNumberRef(NSNumber *nsnumber) {
return (CFNumberRef)nsnumber;
}
+
+/* NSError & CFErrorRef */
+
+NS_INLINE NSError* CWCFToNSError(CFErrorRef cferr) {
+ return (NSError *)cferr;
+}
+
+NS_INLINE CFErrorRef CWNSToCFErrorRef(NSError *nserr) {
+ return (CFErrorRef)nserr;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.