FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/test/module_multi_phase_nogil.cpp at python313 · boostorg/python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
boostorg
/
python
Public
Notifications
You must be signed in to change notification settings
Fork
223
Star
537
Code
Issues
173
Pull requests
34
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
test
/
module_multi_phase_nogil.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 725 Bytes
Breadcrumbs
python
/
test
/
module_multi_phase_nogil.cpp
Copy path
File metadata and controls
25 lines (22 loc) · 725 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
15
16
17
18
19
20
21
22
23
24
25
//
Test for BOOST_PYTHON_MODULE_MULTI_PHASE with optional mod_gil_not_used argument
#
include
<
boost/python/module.hpp
>
#
include
<
boost/python/def.hpp
>
//
Simple function to export
int
get_value
() {
return
1234
;
}
#
if
defined(HAS_CXX11) && (PY_VERSION_HEX >= 0x030D0000)
//
C++11 build with Python 3.13+: test with mod_gil_not_used option
BOOST_PYTHON_MODULE_MULTI_PHASE
(module_multi_phase_nogil_ext, boost::python::mod_gil_not_used())
{
using
namespace
boost
::python
;
def
(
"
get_value
"
, get_value);
}
#
else
//
C++98 build or Python 3.12-: test without optional arguments
BOOST_PYTHON_MODULE_MULTI_PHASE
(module_multi_phase_nogil_ext)
{
using
namespace
boost
::python
;
def
(
"
get_value
"
, get_value);
}
#
endif
Back
|
FazBrowse Home
|
New Git URL