Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move ctypes import from top level into a function, since it's not ava…
…ilable on WASI
  • Loading branch information
mhsmith committed Apr 18, 2024
commit c6d9809398fdf78c0578f7c8818a9192f284851e
2 changes: 1 addition & 1 deletion Lib/test/test_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys
import unittest
from contextlib import contextmanager
from ctypes import CDLL, c_char_p, c_int
from threading import Thread
from time import time

Expand Down Expand Up @@ -37,6 +36,7 @@ def logcat_thread():
self.logcat_process.stdout.close()
Thread(target=logcat_thread).start()

from ctypes import CDLL, c_char_p, c_int
android_log_write = getattr(CDLL("liblog.so"), "__android_log_write")
android_log_write.argtypes = (c_int, c_char_p, c_char_p)
ANDROID_LOG_INFO = 4
Expand Down