blob: be86bb92f9da2b515060690e0000b9efb475c41f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#pragma once
#import <Foundation/Foundation.h>
#define MGL_EXPORT __attribute__((visibility ("default")))
/* Using a compound statement (GNU Extension, supported by clang) */
#define MGL_OBJC_DYNAMIC_CAST(object, type) \
({ \
__typeof__( object ) temp##__LINE__ = (object); \
(type *)([temp##__LINE__ isKindOfClass:[type class]] ? temp##__LINE__ : nil); \
})
|