2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Fix dict bug

[SVN r16866]
This commit is contained in:
Dave Abrahams
2003-01-11 00:18:59 +00:00
parent 72b214b8db
commit e13a11eb7f
3 changed files with 4 additions and 2 deletions

View File

@@ -65,8 +65,8 @@ object dict_base::get(object_cref k) const
{
if (check_exact(this))
{
return object(detail::borrowed_reference(
PyDict_GetItem(this->ptr(),k.ptr())));
PyObject* result = PyDict_GetItem(this->ptr(),k.ptr());
return object(detail::borrowed_reference(result ? result : Py_None));
}
else
{