This file contains hidden or 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
struct BlockObject { | |
Class isa; | |
int retainCount; | |
struct BlockObject *(^alloc)(); | |
struct BlockObject *(^init)(); | |
struct BlockObject *(^retain)(); | |
void (^release)(); | |
struct BlockObject *(^autorelease)(); | |
void (^dealloc)(); | |
} BlockObject = { |
This file contains hidden or 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 <objc/message.h> | |
typedef struct class_t { | |
struct class_t *isa; | |
struct class_t *superclass; | |
void *cache; | |
IMP *vtable; | |
uintptr_t data_NEVER_USE; | |
} class_t; |
This file contains hidden or 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
/* | |
Foo.java | |
*/ | |
package com.apportable.example; | |
... | |
public class Foo { | |
public static void initialize(Activity activity, String appId) { |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
#include "CFBase.h" | |
#include "CFRuntime.h" | |
#include "${1:name}.h" | |
struct __${1:name} { | |
CFRuntimeBase _base; | |
}; |
This file contains hidden or 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
#ifndef _CFBLOCKQUEUE_H_ | |
#define _CFBLOCKQUEUE_H_ | |
#include <Block.h> | |
#include <libkern/OSAtomic.h> | |
#include <CoreFoundation/CFString.h> | |
#include <CoreFoundation/CFSet.h> | |
#include <CoreFoundation/CFRunLoop.h> | |
typedef void (^CFBlockQueueBlock)(void); |
This file contains hidden or 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
extern void _NSSetDeallocHandler(id object, void (^block)(void)); | |
_NSSetDeallocHandler(someObject, ^{ | |
NSLog(@"someObject was deallocated"); | |
}); |
This file contains hidden or 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
#if defined(__APPLE__) // apple ld specific | |
// wrapped ala -Wl,-alias,___wrap_printf,_printf | |
#include <dlfcn.h> | |
#define WRAPFN(f) __wrap_##f | |
#define WRAPFN_DECL(f) WRAPFN(f) | |
#define REALFN(f) __real_##f | |
#define REALFN_DECL(f) (*REALFN(f)) |
This file contains hidden or 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
diff --git a/lib/product.py b/lib/product.py | |
index 82684cc..bcc6b6c 100644 | |
--- a/lib/product.py | |
+++ b/lib/product.py | |
@@ -115,7 +115,7 @@ class DynamicLibrary(Library): | |
def generate(self): | |
if Configuration.current.target.sdk == OSType.Linux: | |
- return Library.generate(self, ["-shared", "-Wl,-soname," + self.product_name, "-Wl,--no-undefined"]) | |
+ return Library.generate(self, ["-shared", "-Wl,-soname," + self.product_name, "-Wl,--no-undefined", "-Wl,-Bsymbolic"]) |
This file contains hidden or 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
#if DEBUG | |
#define ONLY_FOR_DEBUGGER | |
#else | |
#define ONLY_FOR_DEBUGGER UNAVAILABLE_ATTRIBUTE | |
#endif |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
# This should live in the same directory that contains the swift repository and other tools. | |
SRC_DIR=$PWD/swift | |
RUN_TESTS= | |
if [[ "$1" == "-t" || "$1" == "--test" ]] ; then | |
RUN_TESTS="-t" |
OlderNewer