Skip to content

Commit

Permalink
fixup placate pedantic compiler on travis?
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Apr 24, 2021
1 parent 616fc5b commit 37675f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/c_unittests/test_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ TEST_CASE("policy" * doctest::skip()) {
{
auto qd = qdr.qd;

const char *test_module_name = static_cast<const char *>("test_module");
PyObject *module = Py_CompileString(
// language: Python
R"EOT(
Expand All @@ -61,10 +62,10 @@ fake_policy = {
"enableVhostPolicy": 4,
"enableVhostNamePatterns": NotBool(),
})EOT",
"test_module", Py_file_input);
test_module_name, Py_file_input);
REQUIRE(module != nullptr);

PyObject *pModuleObj = PyImport_ExecCodeModule(static_cast<const char *>("test_module"), module);
PyObject *pModuleObj = PyImport_ExecCodeModule(test_module_name, module);
REQUIRE(pModuleObj != nullptr);
// better to check with an if, use PyErr_Print() or such to read the error

Expand Down

0 comments on commit 37675f4

Please sign in to comment.