Skip to content

Commit

Permalink
Try again to create a test that actually runs with only SABI functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjng committed Nov 29, 2024
1 parent 1d87f50 commit 3213ae8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/cc/current_py_cc_libs/python_libs_linking_test.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include <cstdlib>
#include <Python.h>

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;
}

Expand Down

0 comments on commit 3213ae8

Please sign in to comment.