Skip to content

Instantly share code, notes, and snippets.

@jmoody
Created June 28, 2012 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/3011443 to your computer and use it in GitHub Desktop.
Save jmoody/3011443 to your computer and use it in GitHub Desktop.
git patch file for ARC calabash-js
diff --git CalabashJS/CalabashJSLib/LPWebQuery.m CalabashJS/CalabashJSLib/LPWebQuery.m
index a9593c1..a7e49d7 100644
--- CalabashJS/CalabashJSLib/LPWebQuery.m
+++ CalabashJS/CalabashJSLib/LPWebQuery.m
@@ -6,6 +6,10 @@
// Copyright (c) 2012 Trifork. All rights reserved.
//
+#ifndef DEBUG
+#define DEBUG 0
+#endif
+
#import "LPWebQuery.h"
#import "LPJSONUtils.h"
@implementation LPWebQuery
@@ -63,8 +67,8 @@
CGPoint screenCenter = CGPointMake(webViewPoint.x + center.x, webViewPoint.y + center.y);
if (!CGPointEqualToPoint(CGPointZero, center) && [webView pointInside:center withEvent:nil])
{
- NSDictionary *centerDict = (NSDictionary*)CGPointCreateDictionaryRepresentation(screenCenter);
- [dres setValue:[centerDict autorelease] forKey:@"center"];
+ NSDictionary *centerDict = (__bridge_transfer NSDictionary*)CGPointCreateDictionaryRepresentation(screenCenter);
+ [dres setValue:centerDict forKey:@"center"];
[dres setValue:webView forKey:@"webView"];
[result addObject:dres];
if (DEBUG)
@jmoody
Copy link
Author

jmoody commented Jun 28, 2012

apply:

calabash-ios-server/calabash-js]: $ patch -p0 < LPWebQuery_arc_patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment