this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

More Foundation classes (#445)

Also update stub generator

+9 -7
+9 -7
tools/darling-stub-gen
··· 17 17 copyright = """/* 18 18 This file is part of Darling. 19 19 20 - Copyright (C) 2017 Lubos Dolezel 20 + Copyright (C) 2019 Lubos Dolezel 21 21 22 22 Darling is free software: you can redistribute it and/or modify 23 23 it under the terms of the GNU General Public License as published by ··· 36 36 """ 37 37 38 38 c_func_impl_stub = """ 39 - void* %s(void) { 39 + void* %s(void) 40 + { 40 41 if (verbose) puts("STUB: %s called"); 41 42 return NULL; 42 43 } 43 44 """ 44 45 45 - msg_handling = """- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { 46 + msg_handling = """- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 47 + { 46 48 return [NSMethodSignature signatureWithObjCTypes: \"v@:\"]; 47 49 } 48 50 49 - - (void)forwardInvocation:(NSInvocation *)anInvocation { 51 + - (void)forwardInvocation:(NSInvocation *)anInvocation 52 + { 50 53 NSLog(@\"Stub called: %@ in %@\", NSStringFromSelector([anInvocation selector]), [self class]); 51 54 } 52 55 53 56 """ 54 - 55 57 56 58 # Utility functions 57 59 def usage(): ··· 203 205 protocols_regex = re.compile("(@protocol (.+?)[\n ].+?@end)", re.DOTALL | re.MULTILINE) 204 206 classes_regex = re.compile("(@interface (.+?) :.+?@end)", re.DOTALL | re.MULTILINE) 205 207 206 - blacklisted_protocols = ["NSObject", "NSSecureCoding", "NSCoding", "NSCopying", "NSFastEnumeration"] 208 + blacklisted_protocols = ["NSObject", "NSSecureCoding", "NSCoding", "NSCopying", "NSFastEnumeration", "NSMutableCopying"] 207 209 for protocol_def in protocols_regex.finditer(class_dump_output): 208 210 protocol_contents, protocol_name = protocol_def.groups() 209 211 if protocol_name in blacklisted_protocols: ··· 270 272 cmake.write(" Foundation\n") 271 273 cmake.write(")\n") 272 274 273 - c_header.write("\n#endif\n") 275 + c_header.write("\n#endif\n")