27 struct type_caster<f64_3> {
29 PYBIND11_TYPE_CASTER(f64_3, const_name(
"f64_3"));
31 bool load(handle src,
bool) {
32 PyObject *source = src.ptr();
36 if (!PyArg_ParseTuple(source,
"ddd", &x, &y, &z)) {
42 return !PyErr_Occurred();
45 static handle cast(f64_3 src, return_value_policy , handle ) {
46 return Py_BuildValue(
"ddd", src.x(), src.y(), src.z());
51 struct type_caster<i32_3> {
53 PYBIND11_TYPE_CASTER(i32_3, const_name(
"i32_3"));
55 bool load(handle src,
bool) {
56 PyObject *source = src.ptr();
60 if (!PyArg_ParseTuple(source,
"iii", &x, &y, &z)) {
66 return !PyErr_Occurred();
69 static handle cast(i32_3 src, return_value_policy , handle ) {
70 return Py_BuildValue(
"iii", src.x(), src.y(), src.z());
75 struct type_caster<i64_3> {
77 PYBIND11_TYPE_CASTER(i64_3, const_name(
"i64_3"));
79 bool load(handle src,
bool) {
80 PyObject *source = src.ptr();
84 if (!PyArg_ParseTuple(source,
"LLL", &x, &y, &z)) {
90 return !PyErr_Occurred();
93 static handle cast(i64_3 src, return_value_policy , handle ) {
94 return Py_BuildValue(
"LLL", src.x(), src.y(), src.z());
99 struct type_caster<u32_3> {
101 PYBIND11_TYPE_CASTER(u32_3, const_name(
"u32_3"));
103 bool load(handle src,
bool) {
104 PyObject *source = src.ptr();
108 if (!PyArg_ParseTuple(source,
"III", &x, &y, &z)) {
114 return !PyErr_Occurred();
117 static handle cast(u32_3 src, return_value_policy , handle ) {
118 return Py_BuildValue(
"III", src.x(), src.y(), src.z());
123 struct type_caster<u64_3> {
125 PYBIND11_TYPE_CASTER(u64_3, const_name(
"u64_3"));
127 bool load(handle src,
bool) {
128 PyObject *source = src.ptr();
132 if (!PyArg_ParseTuple(source,
"KKK", &x, &y, &z)) {
138 return !PyErr_Occurred();
141 static handle cast(u64_3 src, return_value_policy , handle ) {
142 return Py_BuildValue(
"KKK", src.x(), src.y(), src.z());