We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d87f50 commit 3213ae8Copy full SHA for 3213ae8
tests/cc/current_py_cc_libs/python_libs_linking_test.cc
@@ -1,10 +1,11 @@
1
-#include <cstdlib>
2
#include <Python.h>
3
4
int main(int argc, char** argv) {
+
5
+ PyObject *s = PyUnicode_FromString(argv[0]);
6
// Early return to prevent the broken code below from running.
- char* val = std::getenv("HELLO");
7
- if (val || argc >= 1) {
+ if (argc >= 1) {
8
+ printf("%d\n", (int)s->ob_refcnt);
9
return 0;
10
}
11
0 commit comments