]> git.saurik.com Git - cydia.git/commitdiff
Use a constructor, not +initialize.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 13 Mar 2011 20:27:45 +0000 (13:27 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 14 Mar 2011 12:09:09 +0000 (05:09 -0700)
CyteKit/WebView.mm

index 363b9cb204fad85bef8ef267122a66ac25b8c9d0..3ec751abbac483614c0339df0abf52e95063131a 100644 (file)
@@ -355,7 +355,9 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
     [[[self _documentView] webView] reloadFromOrigin:nil];
 }
 
     [[[self _documentView] webView] reloadFromOrigin:nil];
 }
 
-+ (void) initialize {
+@end
+
+__attribute__((__constructor__)) static void $() {
     if (Class $UIWebViewWebViewDelegate = objc_getClass("UIWebViewWebViewDelegate")) {
         class_addMethod($UIWebViewWebViewDelegate, @selector(webView:addMessageToConsole:), (IMP) &$UIWebViewWebViewDelegate$webView$addMessageToConsole$, "v16@0:4@8@12");
         class_addMethod($UIWebViewWebViewDelegate, @selector(webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:), (IMP) &$UIWebViewWebViewDelegate$webView$decidePolicyForNewWindowAction$request$newFrameName$decisionListener$, "v28@0:4@8@12@16@20@24");
     if (Class $UIWebViewWebViewDelegate = objc_getClass("UIWebViewWebViewDelegate")) {
         class_addMethod($UIWebViewWebViewDelegate, @selector(webView:addMessageToConsole:), (IMP) &$UIWebViewWebViewDelegate$webView$addMessageToConsole$, "v16@0:4@8@12");
         class_addMethod($UIWebViewWebViewDelegate, @selector(webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:), (IMP) &$UIWebViewWebViewDelegate$webView$decidePolicyForNewWindowAction$request$newFrameName$decisionListener$, "v28@0:4@8@12@16@20@24");
@@ -365,5 +367,3 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
         class_addMethod($UIWebViewWebViewDelegate, @selector(webViewClose:), (IMP) &$UIWebViewWebViewDelegate$webViewClose$, "v12@0:4@8");
     }
 }
         class_addMethod($UIWebViewWebViewDelegate, @selector(webViewClose:), (IMP) &$UIWebViewWebViewDelegate$webViewClose$, "v12@0:4@8");
     }
 }
-
-@end