Skip to content

Commit

Permalink
fence async test code
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Nov 5, 2023
1 parent 80022e4 commit 6af64a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions support/__EMSCRIPTEN__.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ embed_isatty(PyObject *self, PyObject *argv) {
return Py_BuildValue("i", isatty(fd) );
}


#if TEST_ASYNCSLEEP

#include "pycore_ceval.h"
#include "pycore_function.h"
#include "pycore_pystate.h" // _PyInterpreterState_GET()
Expand Down Expand Up @@ -492,7 +495,7 @@ puts("481");
puts("done");
Py_RETURN_NONE;
}

#endif // TEST_ASYNCSLEEP

#if SDL2
static PyObject *
Expand All @@ -507,8 +510,9 @@ embed_get_sdl_version(PyObject *self, PyObject *_null)

static PyMethodDef mod_embed_methods[] = {
{"run", (PyCFunction)embed_run, METH_VARARGS | METH_KEYWORDS, "start aio stepping"},

#if TEST_ASYNCSLEEP
{"bcrun", (PyCFunction)embed_bcrun, METH_VARARGS, ""},
#endif
{"preload", (PyCFunction)embed_preload, METH_VARARGS, "emscripten_run_preload_plugins"},
{"dlopen", (PyCFunction)embed_dlopen, METH_VARARGS | METH_KEYWORDS, ""},
{"dlcall", (PyCFunction)embed_dlcall, METH_VARARGS | METH_KEYWORDS, ""},
Expand Down

0 comments on commit 6af64a1

Please sign in to comment.