From a00c8ff4475f7d57ce7346543b46cd4fc7b7136f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 15 Apr 2020 12:23:09 -0700 Subject: [PATCH] AllowNone for wxDVCVariant, like wxVariant --- src/dvcvariant.sip | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dvcvariant.sip b/src/dvcvariant.sip index 248920f0..3df51b16 100644 --- a/src/dvcvariant.sip +++ b/src/dvcvariant.sip @@ -28,7 +28,10 @@ wxVariant wxDVCVariant_in_helper(PyObject* source) { wxVariant ret; - if (wxPyWrappedPtr_TypeCheck(source, wxT("wxDataViewIconText"))) { + if (source == Py_None) { + ret.MakeNull(); + } + else if (wxPyWrappedPtr_TypeCheck(source, wxT("wxDataViewIconText"))) { wxDataViewIconText* ptr; wxPyConvertWrappedPtr(source, (void**)&ptr, wxT("wxDataViewIconText")); ret << *ptr; @@ -57,7 +60,7 @@ PyObject* wxDVCVariant_out_helper(const wxVariant& value) -%MappedType wxDVCVariant +%MappedType wxDVCVariant /AllowNone/ { %ConvertToTypeCode // Code to test a PyObject for compatibility.