Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5f4cc21
Changed NSLog to debug to avoid spamming the console in release builds.
samdeane Apr 30, 2014
cd558e5
Changed NSLog to debug to avoid spamming the console in release builds.
samdeane Apr 30, 2014
f27f92b
Merge branch 'warning-fixes'
samdeane May 23, 2014
cd69cba
XC6 update
samdeane Jun 13, 2014
ea788e1
Merge branch 'master' of github.com:BohemianCoding/CocoaScript
samdeane Jun 13, 2014
d265a7d
Merge commit 'b8e60ecff73c3907dc80b573fb000d63fa50f956' into HEAD
samdeane Jun 13, 2014
70ded2f
Merge commit 'd265a7d'
samdeane Jun 13, 2014
044d191
Merge branch 'master' of github.com:ccgus/CocoaScript
samdeane Jun 23, 2014
f69245f
Merge branch 'debug-callback'
samdeane Jun 23, 2014
aa9d5db
Fixed debug macro.
samdeane Jun 23, 2014
9e912f8
Use a name for the debug method which doesn't clash with the debug ma…
samdeane Jun 23, 2014
679b882
Merge branch 'debug-callback'
samdeane Jun 25, 2014
b159e66
Merge branch 'javascript-debugging-support'
samdeane Jun 25, 2014
936f6f1
Merge branch 'javascript-debugging-support'
samdeane Jun 25, 2014
852774c
Merge branch 'javascript-debugging-support'
samdeane Jun 25, 2014
d186c17
Fixed use of deprecated API
samdeane Aug 15, 2014
f037716
Turned #pragma messages into comments
samdeane Aug 15, 2014
c202ef5
Minor (and slightly ugly) tweak to avoid a warning in release build.
samdeane Sep 1, 2014
78c081d
Turn on SKIP_INSTALL to avoid a warning when archiving
samdeane Sep 1, 2014
ae7c0bb
XC6.1 update
samdeane Nov 18, 2014
aa1dbc0
XC6.1 update - specify the signature for objc_msgSend to prevent a wa…
samdeane Nov 18, 2014
d857274
Import: Add support for absolute and ~ paths
randomsequence Dec 12, 2014
3ba543d
import: reinstate warning for empty base in non-absolute URLs
randomsequence Dec 12, 2014
669c4b0
Merge pull request #2 from BohemianCoding/feature/3319
randomsequence Dec 12, 2014
67e609f
Add support for nested @import statements
randomsequence Dec 16, 2014
33b28c7
Merge pull request #3 from BohemianCoding/feature/3319
randomsequence Dec 16, 2014
fd78d57
Fix a bug which ignored first line of @import-ed scripts
randomsequence Dec 18, 2014
f125568
Merge pull request #4 from BohemianCoding/feature/3319
randomsequence Dec 18, 2014
31b4e73
Added a test script that exhibits the crash
samdeane Feb 11, 2015
fa6871d
Toned down the debug output for the command line tool whilst debuggin…
samdeane Feb 11, 2015
e505ce8
reduced loop as script should crash
samdeane Feb 11, 2015
a812a1b
Slight tweaks to MOBox - tracking down crash
samdeane Feb 11, 2015
3bd263e
Added Andrey's temporary workaround to the crash
samdeane Feb 11, 2015
0aac538
Perform cleanup before exiting - easier to test if it's working...
samdeane Feb 11, 2015
d5ee507
Can't call unprotect from finalize - it wouldn't make much difference…
samdeane Feb 11, 2015
20f99eb
Latest changes from Gus:
samdeane May 27, 2015
0e3c556
Fixed leak of CGColorSpaceRef
samdeane May 27, 2015
821b49d
Keep the analyzer happy with a check for a nil encoding.
samdeane May 27, 2015
e3d2d6d
Fix for a nice leak.
samdeane May 27, 2015
7724039
Disabled the analyzer for a particularly bonkers piece of code.
samdeane May 27, 2015
d48dd44
Another analyzer fix.
samdeane May 27, 2015
f460972
Disabled the analzyer for some particularly gnarly code.
samdeane May 27, 2015
0df6e10
Fixed leak of CGColorSpaceRef
samdeane May 27, 2015
bd27007
Fixed leak of CGColorSpaceRef.
samdeane May 27, 2015
945aab1
Fixed warning.
samdeane May 27, 2015
dd6e529
Changed #pragma to comment to stop it generating a message.
samdeane May 27, 2015
d2b9e4b
Merge branch 'analyzer-fixes' into develop
samdeane May 27, 2015
166c0d4
XC7 updates.
samdeane Jun 10, 2015
ef25dae
Don't use nullable on old versions of Xcode that don't know about it...
samdeane Jun 30, 2015
7f42d6e
and another that XC6.2 doesn't know about
samdeane Jun 30, 2015
b993aea
Slightly cleaner XC6.2 fix.
samdeane Jun 30, 2015
34fd6d9
Replace NSMapTable with NSDictionary & associated objects
randomsequence Aug 20, 2015
7b5a81c
Associate the unboxer with the object, not the box.
randomsequence Aug 20, 2015
bfda639
Remove objects to box map in favour of directly associated objects
randomsequence Aug 20, 2015
28d54ff
Refactor object to box mapping into MOBox
randomsequence Aug 21, 2015
d64d9f8
Merge pull request #6 from BohemianCoding/feature/5799
randomsequence Sep 1, 2015
5b8085d
Revert to 34fd6d9
randomsequence Oct 28, 2015
5fb80ef
Remove MochaUnboxer, which wouldn't have unboxed anything anyway
randomsequence Oct 28, 2015
f817640
Fixed an analyser issue
opsGavin Nov 10, 2015
56bb64a
Added MOBoxManager class to clean up access to boxes a bit.
samdeane Dec 16, 2015
26e5127
Cleaned up boxing a bit, removed the JSProtect hack.
samdeane Dec 16, 2015
b29a1a1
Protect function/selector arguments around calls.
samdeane Dec 16, 2015
58b3f83
Protect all the JS objects representing members of the struct. These …
samdeane Dec 16, 2015
a48761d
Make MOStruct unprotect values when it's shut down.
samdeane Dec 17, 2015
a673e30
Use strong map again instead of dictionary.
samdeane Dec 17, 2015
5246cd5
Simplified slightly.
samdeane Dec 17, 2015
f0e69e8
Commented MOBoxManager
samdeane Dec 17, 2015
12b81e5
Cleaned up and remove some obsolete stuff.
samdeane Dec 17, 2015
9d028f1
Clean out runtime when shutting down COScript, to break retain cycle …
samdeane Dec 17, 2015
ebc6f2a
Strengthened assertion.
samdeane Dec 17, 2015
d7ef038
Brought up to date with Gus' master branch.
samdeane Dec 17, 2015
27b6784
A bit more cleanup.
samdeane Dec 17, 2015
d3273a3
Added some more assertions.
samdeane Dec 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions Cocoa Script.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
229C1FF61C21B38D004C5B3B /* MOBoxManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 229C1FF41C21B38D004C5B3B /* MOBoxManager.h */; };
229C1FF71C21B38D004C5B3B /* MOBoxManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 229C1FF51C21B38D004C5B3B /* MOBoxManager.m */; };
229C1FF81C21B38D004C5B3B /* MOBoxManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 229C1FF51C21B38D004C5B3B /* MOBoxManager.m */; };
384830E21832D48500B34168 /* COSTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 384830E01832D48500B34168 /* COSTarget.h */; };
384830E31832D48500B34168 /* COSTarget.m in Sources */ = {isa = PBXBuildFile; fileRef = 384830E11832D48500B34168 /* COSTarget.m */; };
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
Expand All @@ -29,7 +32,7 @@
CC4143520F25261200E46669 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCC5B8A40F1EFA6D00126722 /* JavaScriptCore.framework */; };
CC4143530F25261300E46669 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
CC4143620F2527CD00E46669 /* CocoaScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC41431A0F25254200E46669 /* CocoaScript.framework */; };
CC4143660F2527E400E46669 /* CocoaScript.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CC41431A0F25254200E46669 /* CocoaScript.framework */; };
CC4143660F2527E400E46669 /* CocoaScript.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CC41431A0F25254200E46669 /* CocoaScript.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
CC5EDD4D1237F6DF00E0D965 /* JSTalkStatusIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5EDD4C1237F6DF00E0D965 /* JSTalkStatusIcon.png */; };
CC5EDD531237F71300E0D965 /* JSTalkStatusIconAlt.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5EDD521237F71300E0D965 /* JSTalkStatusIconAlt.png */; };
CC5FB7DF0F1FDE3800F4ECC2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
Expand Down Expand Up @@ -397,6 +400,9 @@
/* Begin PBXFileReference section */
1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
229C1FF41C21B38D004C5B3B /* MOBoxManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOBoxManager.h; path = src/framework/mocha/Objects/MOBoxManager.h; sourceTree = SOURCE_ROOT; };
229C1FF51C21B38D004C5B3B /* MOBoxManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MOBoxManager.m; path = src/framework/mocha/Objects/MOBoxManager.m; sourceTree = SOURCE_ROOT; };
22E281E41A8BB99D006650D2 /* test.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = test.js; sourceTree = "<group>"; };
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
384830E01832D48500B34168 /* COSTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = COSTarget.h; path = src/framework/COSTarget.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -768,6 +774,7 @@
children = (
CC66D826181A2A810039A0A5 /* CocoaScript_Prefix.pch */,
CC66D8D7181A2FC10039A0A5 /* cocoascript_tool.m */,
22E281E41A8BB99D006650D2 /* test.js */,
);
name = "Other Sources";
sourceTree = "<group>";
Expand Down Expand Up @@ -1130,6 +1137,8 @@
CC66D879181A2B0A0039A0A5 /* MOAllocator.m */,
CC66D87A181A2B0A0039A0A5 /* MOBox.h */,
CC66D87B181A2B0A0039A0A5 /* MOBox.m */,
229C1FF41C21B38D004C5B3B /* MOBoxManager.h */,
229C1FF51C21B38D004C5B3B /* MOBoxManager.m */,
CC66D87C181A2B0A0039A0A5 /* MOClassDescription.h */,
CC66D87D181A2B0A0039A0A5 /* MOClassDescription.m */,
CC66D87E181A2B0A0039A0A5 /* MOClosure_Private.h */,
Expand Down Expand Up @@ -1272,6 +1281,7 @@
CC66D7CD181A2A470039A0A5 /* TDEmpty.h in Headers */,
CC66D8A3181A2B0A0039A0A5 /* MOClosure.h in Headers */,
CC66D7CF181A2A470039A0A5 /* TDLetter.h in Headers */,
229C1FF61C21B38D004C5B3B /* MOBoxManager.h in Headers */,
CC66D7E6181A2A470039A0A5 /* TDRepetition.h in Headers */,
CC66D834181A2A9B0039A0A5 /* COSCIImageAdditions.h in Headers */,
CC66D83E181A2A9B0039A0A5 /* COSQuickCIFilter.h in Headers */,
Expand Down Expand Up @@ -1392,7 +1402,7 @@
2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0700;
TargetAttributes = {
9FC343C61AF7D2FE00B53759 = {
CreatedOnToolsVersion = 6.3.1;
Expand Down Expand Up @@ -1506,6 +1516,7 @@
CC66D7DF181A2A470039A0A5 /* TDParser.m in Sources */,
384830E31832D48500B34168 /* COSTarget.m in Sources */,
CC66D86B181A2AE10039A0A5 /* MochaRuntime.m in Sources */,
229C1FF81C21B38D004C5B3B /* MOBoxManager.m in Sources */,
CC66D821181A2A710039A0A5 /* COSExtras.m in Sources */,
CC66D83F181A2A9B0039A0A5 /* COSQuickCIFilter.m in Sources */,
CC66D81F181A2A710039A0A5 /* COScript.m in Sources */,
Expand Down Expand Up @@ -1672,6 +1683,7 @@
CC9FF01118296A2B009DB0F9 /* TDToken.m in Sources */,
CC9FF01318296A2B009DB0F9 /* TDTokenArraySource.m in Sources */,
CC9FF01518296A2B009DB0F9 /* TDTokenAssembly.m in Sources */,
229C1FF71C21B38D004C5B3B /* MOBoxManager.m in Sources */,
CC9FF01718296A2B009DB0F9 /* TDTokenizer.m in Sources */,
CCD3834A195A454F00C436B9 /* COSDatabaseQueue.m in Sources */,
CC9FF01918296A2B009DB0F9 /* TDTokenizerState.m in Sources */,
Expand Down Expand Up @@ -1812,6 +1824,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-DDEBUG";
OTHER_LDFLAGS = "-lffi";
PRODUCT_BUNDLE_IDENTIFIER = com.cocoascript.CocoaScript;
PRODUCT_NAME = "Cocoa Script Editor";
};
name = Debug;
Expand All @@ -1827,6 +1840,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-lffi";
PRODUCT_BUNDLE_IDENTIFIER = com.cocoascript.CocoaScript;
PRODUCT_NAME = "Cocoa Script Editor";
};
name = Release;
Expand All @@ -1840,9 +1854,13 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -1866,9 +1884,12 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand Down Expand Up @@ -1912,7 +1933,9 @@
AppKit,
"-lexpat",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.cocoascript.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = CocoaScript;
SKIP_INSTALL = YES;
};
name = Debug;
};
Expand Down Expand Up @@ -1945,7 +1968,9 @@
"-lexpat",
"-lffi",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.cocoascript.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = CocoaScript;
SKIP_INSTALL = YES;
};
name = Release;
};
Expand Down
26 changes: 12 additions & 14 deletions res/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,12 @@
<string>JSTPluginMover</string>
</dict>
</array>

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Cocoa Script Whatever</string>
<key>CFBundleURLSchemes</key>
<array>
<string>x-coscript</string>
</array>
</dict>
</array>

<key>CFBundleExecutable</key>
<string>Cocoa Script Editor</string>
<key>CFBundleIconFile</key>
<string>JSTalk.icns</string>
<key>CFBundleIdentifier</key>
<string>com.cocoascript.CocoaScript</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -80,6 +67,17 @@
<string>3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Cocoa Script Whatever</string>
<key>CFBundleURLSchemes</key>
<array>
<string>x-coscript</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
Expand Down
2 changes: 1 addition & 1 deletion res/JSTalkFramework-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.cocoascript.${PRODUCT_NAME:identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
17 changes: 17 additions & 0 deletions src/cocoascript_tool.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

BOOL JSCErrorHandlerExitOnError = YES;

@interface NullDebugController : NSObject<CODebugController>

@end

@implementation NullDebugController

- (void)output:(NSString*)format args:(va_list)args
{

}

@end

@interface JSCErrorHandler : NSObject {

}
Expand Down Expand Up @@ -92,11 +105,15 @@ int main(int argc, char *argv[]) {
}
}

[COScript setDebugController:[NullDebugController new]];

id o = [t executeString:source];

if (o) {
printf("%s\n", [[o description] UTF8String]);
}

[t cleanup];

return 0;
}
6 changes: 6 additions & 0 deletions src/framework/COSExtras.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@ - (void)system:(NSString*)s {

@implementation NSApplication (COSExtras)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

- (id)open:(NSString*)pathToFile {

NSError *err = nil;

NSURL *url = [NSURL fileURLWithPath:pathToFile];

// TODO - this call needs replacing as it is deprecated, but the new API is async so it requires a little bit of work
id doc = [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url
display:YES
error:&err];
Expand All @@ -120,6 +124,8 @@ - (id)open:(NSString*)pathToFile {
return doc;
}

#pragma clang diagnostic pop

- (void)activate {
ProcessSerialNumber xpsn = { 0, kCurrentProcess };
SetFrontProcess( &xpsn );
Expand Down
2 changes: 1 addition & 1 deletion src/framework/COSR.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ - (instancetype)makeTable:(NSString*)tableName {

COSR *sub = [self subTableWithName:tableName];

#pragma message "FIXME: make sure to return an existing one if it's already around"
// FIXME: make sure to return an existing one if it's already around

[sub setTableID:[NSString stringWithUUID]];
[self setObject:sub forKeyedSubscript:tableName];
Expand Down
6 changes: 3 additions & 3 deletions src/framework/COScript.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ - (void)cleanup {
[self deleteObjectWithName:@"log"];

[_mochaRuntime shutdown];

_mochaRuntime = nil;
}

- (void)garbageCollect {
Expand All @@ -111,7 +111,7 @@ - (void)garbageCollect {

[_mochaRuntime garbageCollect];

debug(@"gc took %f seconds", [NSDate timeIntervalSinceReferenceDate] - start);
debug(@"gc took %f seconds", [NSDate timeIntervalSinceReferenceDate] - start); (void)start;
}


Expand Down Expand Up @@ -268,7 +268,7 @@ + (void)loadBridgeSupportFileAtURL:(NSURL*)url {

NSString *currentCOScriptThreadIdentifier = @"org.jstalk.currentCOScriptHack";

#pragma message "FIXME: Change currentCOScript and friends to use a stack in the thread dictionary, instead of just overwriting what might already be there."
// FIXME: Change currentCOScript and friends to use a stack in the thread dictionary, instead of just overwriting what might already be there."

+ (NSMutableArray*)currentCOSThreadStack {

Expand Down
4 changes: 2 additions & 2 deletions src/framework/TETextUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ unsigned TE_numberOfLeadingSpacesFromRangeInString(NSString *string, NSRange *ra
unsigned tabW = tabWidth;
NSUInteger endOfWhiteSpaceIndex = NSNotFound;

if (range->length == 0) {
if (range && range->length == 0) {
return 0;
}

Expand Down Expand Up @@ -521,7 +521,7 @@ unsigned TE_expandVariablesInString(NSMutableString *input, NSString *variableSt
replacement = nil;
[invocation getReturnValue:&replacement];
#else
replacement = objc_msgSend(modalDelegate, callbackSelector, varName, input, varRange, replacementRange, context);
replacement = ((NSString* (*)(id, SEL, id, id, NSRange, NSRange, void*))objc_msgSend)(modalDelegate, callbackSelector, varName, input, varRange, replacementRange, context);
#endif

if (replacement) {
Expand Down
2 changes: 1 addition & 1 deletion src/framework/imagetools/COSCodeSketcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void)setupWindow {

NSPoint p = [NSEvent mouseLocation];

p = [_mwindow convertScreenToBase:p];
p = [_mwindow convertRectFromScreen:NSMakeRect(p.x, p.y, 0, 0)].origin;
_mouseLocation = [self convertPoint:p fromView:nil];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/framework/imagetools/COSQuickCIFilter.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "COSQuickCIFilter.h"

#pragma message "FIXME: Gus- you can get CI kernel errors like so: http://stackoverflow.com/questions/13754997/how-do-you-debug-syntax-errors-in-a-core-image-kernel"
// FIXME: Gus- you can get CI kernel errors like so: http://stackoverflow.com/questions/13754997/how-do-you-debug-syntax-errors-in-a-core-image-kernel"
/*
If you use introspection on the CIKernel class, you will find a kernelsWithString:messageLog: method. There is no public interface to it, but don't let that stop you…

Expand Down
Loading