This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard { | |
// pasteboard must be stored away because there's no way to get it in -pasteboardPropertyListForType: :( | |
_currentPasteboard = pasteboard; | |
NSArray *types = @[(id)kPasteboardTypeFileURLPromise, (id)kPasteboardTypeFilePromiseContent]; | |
return types; | |
} | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <assert.h> | |
//Compile with `clang -Os -framework Foundation -fno-objc-arc inlinestorage.m -o inline, run with `inline clever` or `inline naive` | |
/* | |
NaiveArray implements a simple immutable NSArray-like interface in probably the most obvious way: store a pointer to a C array of objects | |
*/ | |
@interface NaiveArray : NSObject { | |
NSUInteger count; |