Skip to content

Commit

Permalink
Merge pull request swig#1619 from emminizer/fix-msvc2019-python
Browse files Browse the repository at this point in the history
Fix error in generated code for Python in MSVC 2019.
  • Loading branch information
wsfulton committed Oct 1, 2019
2 parents 4c86ed4 + 9fc57f4 commit 97a107e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Lib/python/std_map.i
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Lib/python/std_multimap.i
Expand Up @@ -29,7 +29,7 @@
%#endif
res = traits_asptr_stdseq<std::multimap<K,T>, std::pair<K, T> >::asptr(items, val);
} else {
multimap_type *p;
multimap_type *p = 0;
swig_type_info *descriptor = swig::type_info<multimap_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;
Expand Down
4 changes: 2 additions & 2 deletions Lib/python/std_pair.i
Expand Up @@ -47,7 +47,7 @@
res = get_pair(first, second, val);
}
} else {
value_type *p;
value_type *p = 0;
swig_type_info *descriptor = swig::type_info<value_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = *p;
Expand Down Expand Up @@ -104,7 +104,7 @@
res = get_pair(first, second, val);
}
} else {
value_type *p;
value_type *p = 0;
swig_type_info *descriptor = swig::type_info<value_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;
Expand Down
2 changes: 1 addition & 1 deletion Lib/python/std_unordered_map.i
Expand Up @@ -87,7 +87,7 @@
%#endif
res = traits_asptr_stdseq<std::unordered_map<K,T,Hash,Compare,Alloc>, std::pair<K, T> >::asptr(items, val);
} else {
unordered_map_type *p;
unordered_map_type *p = 0;
swig_type_info *descriptor = swig::type_info<unordered_map_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;
Expand Down
2 changes: 1 addition & 1 deletion Lib/python/std_unordered_multimap.i
Expand Up @@ -36,7 +36,7 @@
%#endif
res = traits_asptr_stdseq<std::unordered_multimap<K,T,Hash,Compare,Alloc>, std::pair<K, T> >::asptr(items, val);
} else {
unordered_multimap_type *p;
unordered_multimap_type *p = 0;
swig_type_info *descriptor = swig::type_info<unordered_multimap_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;
Expand Down

0 comments on commit 97a107e

Please sign in to comment.