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
c0e90057
Commit
c0e90057
authored
Feb 03, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converting as many py::class_ to py::classh as possible, not breaking tests.
parent
f912019b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
24 deletions
+40
-24
tests/test_class_sh_factory_constructors.cpp
+40
-24
No files found.
tests/test_class_sh_factory_constructors.cpp
View file @
c0e90057
...
...
@@ -57,73 +57,89 @@ std::unique_ptr<atyp_udcp const, sddc> rtrn_udcp() { return std::unique_ptr<atyp
}
// namespace test_class_sh_factory_constructors
}
// namespace pybind11_tests
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_valu)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_rref)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_cref)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_mref)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_cptr)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_mptr)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_valu
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_rref
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_cref
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_mref
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_cptr
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_mptr
)
// PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_shmp)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_shcp)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_shcp
)
// PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_uqmp)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_uqcp)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_uqcp
)
// PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_udmp)
//
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::test_class_sh_factory_constructors::atyp_udcp)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
test_class_sh_factory_constructors
::
atyp_udcp
)
TEST_SUBMODULE
(
class_sh_factory_constructors
,
m
)
{
using
namespace
pybind11_tests
::
test_class_sh_factory_constructors
;
py
::
class
_
<
atyp_valu
>
(
m
,
"atyp_valu"
)
py
::
class
h
<
atyp_valu
>
(
m
,
"atyp_valu"
)
.
def
(
py
::
init
(
&
rtrn_valu
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_valu
>
);
py
::
class
_
<
atyp_rref
>
(
m
,
"atyp_rref"
)
py
::
class
h
<
atyp_rref
>
(
m
,
"atyp_rref"
)
.
def
(
py
::
init
(
&
rtrn_rref
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_rref
>
);
py
::
class_
<
atyp_cref
>
(
m
,
"atyp_cref"
)
// ... must return a compatible ...
py
::
classh
<
atyp_cref
>
(
m
,
"atyp_cref"
)
// class_: ... must return a compatible ...
// classh: ... cannot pass object of non-trivial type ...
// .def(py::init(&rtrn_cref))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_cref
>
);
py
::
class_
<
atyp_mref
>
(
m
,
"atyp_mref"
)
// ... must return a compatible ...
py
::
classh
<
atyp_mref
>
(
m
,
"atyp_mref"
)
// class_: ... must return a compatible ...
// classh: ... cannot pass object of non-trivial type ...
// .def(py::init(&rtrn_mref))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_mref
>
);
py
::
class_
<
atyp_cptr
>
(
m
,
"atyp_cptr"
)
// ... must return a compatible ...
py
::
classh
<
atyp_cptr
>
(
m
,
"atyp_cptr"
)
// class_: ... must return a compatible ...
// classh: ... must return a compatible ...
// .def(py::init(&rtrn_cptr))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_cptr
>
);
py
::
class
_
<
atyp_mptr
>
(
m
,
"atyp_mptr"
)
py
::
class
h
<
atyp_mptr
>
(
m
,
"atyp_mptr"
)
.
def
(
py
::
init
(
&
rtrn_mptr
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_mptr
>
);
// NEEDED FOR FEATURE PARITY: shmp
py
::
class_
<
atyp_shmp
,
std
::
shared_ptr
<
atyp_shmp
>>
(
m
,
"atyp_shmp"
)
// py::classh<atyp_shmp>(m, "atyp_shmp")
// classh: ... cannot pass object of non-trivial type ...
.
def
(
py
::
init
(
&
rtrn_shmp
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_shmp
>
);
py
::
class_
<
atyp_shcp
,
std
::
shared_ptr
<
atyp_shcp
>>
(
m
,
"atyp_shcp"
)
// ... must return a compatible ...
// py::class_<atyp_shcp, std::shared_ptr<atyp_shcp>>(m, "atyp_shcp")
py
::
classh
<
atyp_shcp
>
(
m
,
"atyp_shcp"
)
// class_: ... must return a compatible ...
// classh: ... cannot pass object of non-trivial type ...
// .def(py::init(&rtrn_shcp))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_shcp
>
);
// NEEDED FOR FEATURE PARITY: uqmp
py
::
class_
<
atyp_uqmp
>
(
m
,
"atyp_uqmp"
)
// classh: ... cannot pass object of non-trivial type ...
.
def
(
py
::
init
(
&
rtrn_uqmp
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_uqmp
>
);
py
::
class_
<
atyp_uqcp
>
(
m
,
"atyp_uqcp"
)
// ... cannot pass object of non-trivial type ...
py
::
classh
<
atyp_uqcp
>
(
m
,
"atyp_uqcp"
)
// class_: ... cannot pass object of non-trivial type ...
// classh: ... cannot pass object of non-trivial type ...
// .def(py::init(&rtrn_uqcp))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_uqcp
>
);
// NEEDED FOR FEATURE PARITY: udmp
py
::
class_
<
atyp_udmp
,
std
::
unique_ptr
<
atyp_udmp
,
sddm
>>
(
m
,
"atyp_udmp"
)
// py::classh<atyp_udmp>(m, "atyp_udmp")
// classh: ... cannot pass object of non-trivial type ...
.
def
(
py
::
init
(
&
rtrn_udmp
))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_udmp
>
);
py
::
class_
<
atyp_udcp
,
std
::
unique_ptr
<
atyp_udcp
,
sddc
>>
(
m
,
"atyp_udcp"
)
// ... must return a compatible ...
// py::class_<atyp_udcp, std::unique_ptr<atyp_udcp, sddc>>(m, "atyp_udcp")
py
::
classh
<
atyp_udcp
>
(
m
,
"atyp_udcp"
)
// class_: ... must return a compatible ...
// classh: ... cannot pass object of non-trivial type ...
// .def(py::init(&rtrn_udcp))
.
def
(
"get_mtxt"
,
get_mtxt
<
atyp_udcp
>
);
}
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