File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 3232int PyRun_SimpleString (const char *);
3333void Py_Finalize (void );
3434
35+ void Py_IncRef (void *);
36+ void Py_DecRef (void *);
37+
3538int PythonInitialize (int argc, const char **argv, const char *custom_builtin_importer)
3639{
3740 int ret = 0 ;
@@ -61,3 +64,5 @@ void PythonRunSimpleString(const char *string)
6164{
6265 PyRun_SimpleString (string);
6366}
67+
68+ ForceLink (Python, Py_IncRef(nil ); Py_DecRef(nil ))
Original file line number Diff line number Diff line change 2424
2525#import < Foundation/Foundation.h>
2626
27+ #define ForceLink (package, body ) \
28+ @interface ForceLink ##package : NSObject \
29+ @end \
30+ \
31+ @implementation ForceLink ##package \
32+ - (void )foo { \
33+ body; \
34+ } \
35+ @end
36+
2737NS_ASSUME_NONNULL_BEGIN
2838
2939int PythonInitialize (int , const char **, const char *);
You can’t perform that action at this time.
0 commit comments