Remove redundant ConvertibleToKotlin protocol from runtime

This commit is contained in:
Svyatoslav Scherbina
2019-10-10 12:50:07 +03:00
committed by SvyatoslavScherbina
parent c32fa6313b
commit fde7265dae
4 changed files with 15 additions and 20 deletions
-5
View File
@@ -34,11 +34,6 @@ inline static OBJ_GETTER(AllocInstanceWithAssociatedObject, const TypeInfo* type
extern "C" id Kotlin_ObjCExport_refToObjC(ObjHeader* obj); extern "C" id Kotlin_ObjCExport_refToObjC(ObjHeader* obj);
extern "C" OBJ_GETTER(Kotlin_ObjCExport_refFromObjC, id obj); extern "C" OBJ_GETTER(Kotlin_ObjCExport_refFromObjC, id obj);
@protocol ConvertibleToKotlin
@required
-(KRef)toKotlin:(KRef*)OBJ_RESULT;
@end;
extern "C" id Kotlin_Interop_CreateNSStringFromKString(KRef str); extern "C" id Kotlin_Interop_CreateNSStringFromKString(KRef str);
extern "C" OBJ_GETTER(Kotlin_Interop_CreateKStringFromNSString, NSString* str); extern "C" OBJ_GETTER(Kotlin_Interop_CreateKStringFromNSString, NSString* str);
+1 -1
View File
@@ -14,7 +14,7 @@
#import "Memory.h" #import "Memory.h"
#import "ObjCExport.h" #import "ObjCExport.h"
@interface KotlinBase : NSObject <ConvertibleToKotlin, NSCopying> @interface KotlinBase : NSObject <NSCopying>
+(instancetype)createWrapper:(ObjHeader*)obj; +(instancetype)createWrapper:(ObjHeader*)obj;
@end; @end;
+4 -4
View File
@@ -130,7 +130,7 @@ extern "C" id objc_autoreleaseReturnValue(id self);
@end; @end;
@interface NSObject (NSObjectToKotlin) <ConvertibleToKotlin> @interface NSObject (NSObjectToKotlin)
@end; @end;
static void checkLoadedOnce(); static void checkLoadedOnce();
@@ -152,7 +152,7 @@ static void checkLoadedOnce();
} }
@end; @end;
@interface NSString (NSStringToKotlin) <ConvertibleToKotlin> @interface NSString (NSStringToKotlin)
@end; @end;
@implementation NSString (NSStringToKotlin) @implementation NSString (NSStringToKotlin)
@@ -176,7 +176,7 @@ OBJ_GETTER(Kotlin_boxDouble, KDouble value);
} }
@interface NSNumber (NSNumberToKotlin) <ConvertibleToKotlin> @interface NSNumber (NSNumberToKotlin)
@end; @end;
@implementation NSNumber (NSNumberToKotlin) @implementation NSNumber (NSNumberToKotlin)
@@ -202,7 +202,7 @@ OBJ_GETTER(Kotlin_boxDouble, KDouble value);
} }
@end; @end;
@interface NSDecimalNumber (NSDecimalNumberToKotlin) <ConvertibleToKotlin> @interface NSDecimalNumber (NSDecimalNumberToKotlin)
@end; @end;
@implementation NSDecimalNumber (NSDecimalNumberToKotlin) @implementation NSDecimalNumber (NSDecimalNumberToKotlin)
+10 -10
View File
@@ -81,7 +81,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
return index; return index;
} }
@interface NSArray (NSArrayToKotlin) <ConvertibleToKotlin> @interface NSArray (NSArrayToKotlin)
@end; @end;
@implementation NSArray (NSArrayToKotlin) @implementation NSArray (NSArrayToKotlin)
@@ -94,7 +94,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
} }
@end; @end;
@interface NSMutableArray (NSMutableArrayToKotlin) <ConvertibleToKotlin> @interface NSMutableArray (NSMutableArrayToKotlin)
@end; @end;
@implementation NSMutableArray (NSArrayToKotlin) @implementation NSMutableArray (NSArrayToKotlin)
@@ -108,7 +108,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
@end; @end;
@interface NSSet (NSSetToKotlin) <ConvertibleToKotlin> @interface NSSet (NSSetToKotlin)
@end; @end;
@implementation NSSet (NSSetToKotlin) @implementation NSSet (NSSetToKotlin)
@@ -122,7 +122,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
@end; @end;
@interface NSDictionary (NSDictionaryToKotlin) <ConvertibleToKotlin> @interface NSDictionary (NSDictionaryToKotlin)
@end; @end;
@implementation NSDictionary (NSDictionaryToKotlin) @implementation NSDictionary (NSDictionaryToKotlin)
@@ -165,7 +165,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
} }
@end; @end;
@interface KListAsNSArray : NSArray <ConvertibleToKotlin> @interface KListAsNSArray : NSArray
@end; @end;
@implementation KListAsNSArray { @implementation KListAsNSArray {
@@ -199,7 +199,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
@end; @end;
@interface KMutableListAsNSMutableArray : NSMutableArray <ConvertibleToKotlin> @interface KMutableListAsNSMutableArray : NSMutableArray
@end; @end;
@implementation KMutableListAsNSMutableArray { @implementation KMutableListAsNSMutableArray {
@@ -258,7 +258,7 @@ static inline KInt objCIndexToKotlinOrThrow(NSUInteger index) {
@end; @end;
@interface KSetAsNSSet : NSSet <ConvertibleToKotlin> @interface KSetAsNSSet : NSSet
@end; @end;
static inline id KSet_getElement(KRef set, id object) { static inline id KSet_getElement(KRef set, id object) {
@@ -314,7 +314,7 @@ static inline id KSet_getElement(KRef set, id object) {
} }
@end; @end;
@interface KotlinMutableSet : NSMutableSet <ConvertibleToKotlin> @interface KotlinMutableSet : NSMutableSet
@end; @end;
@implementation KotlinMutableSet { @implementation KotlinMutableSet {
@@ -408,7 +408,7 @@ static inline id KSet_getElement(KRef set, id object) {
} }
@end; @end;
@interface KMapAsNSDictionary : NSDictionary <ConvertibleToKotlin> @interface KMapAsNSDictionary : NSDictionary
@end; @end;
static inline id KMap_get(KRef map, id aKey) { static inline id KMap_get(KRef map, id aKey) {
@@ -462,7 +462,7 @@ static inline id KMap_get(KRef map, id aKey) {
@end; @end;
@interface KotlinMutableDictionary : NSMutableDictionary <ConvertibleToKotlin> @interface KotlinMutableDictionary : NSMutableDictionary
@end; @end;
@implementation KotlinMutableDictionary { @implementation KotlinMutableDictionary {