Skip to content

Commit 3213ae8

Browse files
committed
Try again to create a test that actually runs with only SABI functions
1 parent 1d87f50 commit 3213ae8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/cc/current_py_cc_libs/python_libs_linking_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
#include <cstdlib>
21
#include <Python.h>
32

43
int main(int argc, char** argv) {
4+
5+
PyObject *s = PyUnicode_FromString(argv[0]);
56
// Early return to prevent the broken code below from running.
6-
char* val = std::getenv("HELLO");
7-
if (val || argc >= 1) {
7+
if (argc >= 1) {
8+
printf("%d\n", (int)s->ob_refcnt);
89
return 0;
910
}
1011

0 commit comments

Comments
 (0)