Skip to content

Commit 1f21141

Browse files
committed
Add #ifdef to avoid unused-function warning on other platforms
1 parent c6d9809 commit 1f21141

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/pylifecycle.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ static PyStatus add_main_module(PyInterpreterState *interp);
7171
static PyStatus init_import_site(void);
7272
static PyStatus init_set_builtins_open(void);
7373
static PyStatus init_sys_streams(PyThreadState *tstate);
74+
#ifdef __ANDROID__
7475
static void init_android_streams(PyThreadState *tstate);
76+
#endif
7577
static void wait_for_thread_shutdown(PyThreadState *tstate);
7678
static void call_ll_exitfuncs(_PyRuntimeState *runtime);
7779

@@ -2724,6 +2726,7 @@ init_sys_streams(PyThreadState *tstate)
27242726
}
27252727

27262728

2729+
#ifdef __ANDROID__
27272730
/* Redirecting streams to the log is a convenience, but won't be critical for
27282731
every app, so failures of this function are non-fatal. */
27292732
static void
@@ -2744,6 +2747,7 @@ init_android_streams(PyThreadState *tstate)
27442747
}
27452748
Py_XDECREF(_android_support);
27462749
}
2750+
#endif
27472751

27482752

27492753
static void

0 commit comments

Comments
 (0)