Fix error in generated code for Python in MSVC 2019.

Visual Studio 2019 release builds:
error C4703: potentially uninitialized local pointer variable 'p' used
This commit is contained in:
Daniel Emminizer 2019-08-29 09:10:41 -04:00
commit 9fc57f47bd
5 changed files with 6 additions and 6 deletions

View file

@ -101,7 +101,7 @@
%#endif
res = traits_asptr_stdseq<map_type, std::pair<K, T> >::asptr(items, val);
} else {
map_type *p;
map_type *p = 0;
swig_type_info *descriptor = swig::type_info<map_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;