mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 16:37:13 +00: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…
Reference in New Issue
Block a user