FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppjit/python/cppjit/_stdcpp_fix.py at main · compiler-research/cppjit · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
compiler-research
/
cppjit
Public
Notifications
You must be signed in to change notification settings
Fork
8
Star
12
Code
Issues
6
Pull requests
5
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cppjit
/
python
/
cppjit
/
_stdcpp_fix.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (12 loc) · 525 Bytes
Breadcrumbs
cppjit
/
python
/
cppjit
/
_stdcpp_fix.py
Copy path
File metadata and controls
14 lines (12 loc) · 525 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
sys
# It may be that the interpreter (wether python or pypy-c) was not linked
# with C++; force its loading before doing anything else (note that not
# linking with C++ spells trouble anyway for any C++ libraries ...)
if
"linux"
in
sys
.
platform
and
"GCC"
in
sys
.
version
:
# TODO: check executable to see whether linking indeed didn't happen
import
ctypes
try
:
stdcpp
=
ctypes
.
CDLL
(
"libstdc++.so"
,
ctypes
.
RTLD_GLOBAL
)
except
Exception
:
pass
# TODO: what if Linux/clang and what if Mac?
Back
|
FazBrowse Home
|
New Git URL