Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
e639c3a7
Commit
e639c3a7
authored
Dec 02, 2020
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming value_and_holder::vh to zzz_vh, to pin-point where it is used
parent
e6a3215c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/pybind11/cast.h
+5
-5
No files found.
include/pybind11/cast.h
View file @
e639c3a7
...
...
@@ -211,12 +211,12 @@ struct value_and_holder {
instance
*
inst
=
nullptr
;
size_t
index
=
0u
;
const
detail
::
type_info
*
type
=
nullptr
;
void
**
vh
=
nullptr
;
void
**
zzz_
vh
=
nullptr
;
// Main constructor for a found value/holder:
value_and_holder
(
instance
*
i
,
const
detail
::
type_info
*
type
,
size_t
vpos
,
size_t
index
)
:
inst
{
i
},
index
{
index
},
type
{
type
},
vh
{
inst
->
simple_layout
?
inst
->
simple_value_holder
:
&
inst
->
nonsimple
.
values_and_holders
[
vpos
]}
zzz_
vh
{
inst
->
simple_layout
?
inst
->
simple_value_holder
:
&
inst
->
nonsimple
.
values_and_holders
[
vpos
]}
{}
// Default constructor (used to signal a value-and-holder not found by get_value_and_holder())
...
...
@@ -226,13 +226,13 @@ struct value_and_holder {
value_and_holder
(
size_t
index
)
:
index
{
index
}
{}
template
<
typename
V
>
V
*&
xxx_value_ptr
()
const
{
return
reinterpret_cast
<
V
*&>
(
vh
[
0
]);
return
reinterpret_cast
<
V
*&>
(
zzz_
vh
[
0
]);
}
// True if this `value_and_holder` has a non-null value pointer
explicit
operator
bool
()
const
{
return
xxx_value_ptr
<
void
>
();
}
template
<
typename
H
>
H
&
xxx_holder
()
const
{
return
reinterpret_cast
<
H
&>
(
vh
[
1
]);
return
reinterpret_cast
<
H
&>
(
zzz_
vh
[
1
]);
}
bool
holder_constructed
()
const
{
return
inst
->
simple_layout
...
...
@@ -292,7 +292,7 @@ public:
bool
operator
!=
(
const
iterator
&
other
)
const
{
return
curr
.
index
!=
other
.
curr
.
index
;
}
iterator
&
operator
++
()
{
if
(
!
inst
->
simple_layout
)
curr
.
vh
+=
1
+
(
*
types
)[
curr
.
index
]
->
holder_size_in_ptrs
;
curr
.
zzz_
vh
+=
1
+
(
*
types
)[
curr
.
index
]
->
holder_size_in_ptrs
;
++
curr
.
index
;
curr
.
type
=
curr
.
index
<
types
->
size
()
?
(
*
types
)[
curr
.
index
]
:
nullptr
;
return
*
this
;
...
...
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