Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
084ca0e5
Commit
084ca0e5
authored
Apr 25, 2016
by
Wenzel Jakob
Browse files
compilation fixes
parent
39e97e6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
include/pybind11/common.h
include/pybind11/common.h
+0
-4
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+2
-2
No files found.
include/pybind11/common.h
View file @
084ca0e5
...
@@ -128,10 +128,6 @@
...
@@ -128,10 +128,6 @@
} \
} \
PyObject *pybind11_init()
PyObject *pybind11_init()
extern
"C"
{
extern
PyThreadState
*
_PyThreadState_Current
;
};
NAMESPACE_BEGIN
(
pybind11
)
NAMESPACE_BEGIN
(
pybind11
)
typedef
Py_ssize_t
ssize_t
;
typedef
Py_ssize_t
ssize_t
;
...
...
include/pybind11/pybind11.h
View file @
084ca0e5
...
@@ -1070,7 +1070,7 @@ public:
...
@@ -1070,7 +1070,7 @@ public:
tstate
->
gilstate_counter
=
0
;
tstate
->
gilstate_counter
=
0
;
PyThread_set_key_value
(
internals
.
tstate
,
tstate
);
PyThread_set_key_value
(
internals
.
tstate
,
tstate
);
}
else
{
}
else
{
release
=
_
PyThreadState_
Current
!=
tstate
;
release
=
PyThreadState_
GET
()
!=
tstate
;
}
}
if
(
release
)
{
if
(
release
)
{
...
@@ -1091,7 +1091,7 @@ public:
...
@@ -1091,7 +1091,7 @@ public:
void
dec_ref
()
{
void
dec_ref
()
{
--
tstate
->
gilstate_counter
;
--
tstate
->
gilstate_counter
;
#if !defined(NDEBUG)
#if !defined(NDEBUG)
if
(
_
PyThreadState_
Current
!=
tstate
)
if
(
PyThreadState_
GET
()
!=
tstate
)
pybind11_fail
(
"scoped_acquire::dec_ref(): thread state must be current!"
);
pybind11_fail
(
"scoped_acquire::dec_ref(): thread state must be current!"
);
if
(
tstate
->
gilstate_counter
<
0
)
if
(
tstate
->
gilstate_counter
<
0
)
pybind11_fail
(
"scoped_acquire::dec_ref(): reference count underflow!"
);
pybind11_fail
(
"scoped_acquire::dec_ref(): reference count underflow!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment