diff --git a/tests/cc/current_py_cc_libs/python_libs_linking_test.cc b/tests/cc/current_py_cc_libs/python_libs_linking_test.cc index f3221ad8be..64d7e5ae0a 100644 --- a/tests/cc/current_py_cc_libs/python_libs_linking_test.cc +++ b/tests/cc/current_py_cc_libs/python_libs_linking_test.cc @@ -1,10 +1,11 @@ -#include #include int main(int argc, char** argv) { + + PyObject *s = PyUnicode_FromString(argv[0]); // Early return to prevent the broken code below from running. - char* val = std::getenv("HELLO"); - if (val || argc >= 1) { + if (argc >= 1) { + printf("%d\n", (int)s->ob_refcnt); return 0; }