mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-06 15:35:29 +08:00
don't allow 'void' or 'void*' as a function argument
This commit is contained in:
parent
5f15121b0c
commit
62127a27b0
@ -300,7 +300,7 @@ protected:
|
|||||||
|
|
||||||
template <> class type_caster<void_type> {
|
template <> class type_caster<void_type> {
|
||||||
public:
|
public:
|
||||||
bool load(PyObject *, bool) { return true; }
|
bool load(PyObject *, bool) { return false; }
|
||||||
static PyObject *cast(void_type, return_value_policy /* policy */, PyObject * /* parent */) {
|
static PyObject *cast(void_type, return_value_policy /* policy */, PyObject * /* parent */) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user