Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ void CPythonObject::NamedGetter(v8::Local<v8::String> prop, const v8::PropertyCa

if (PyGen_Check(obj.ptr())) CALLBACK_RETURN(v8::Undefined(info.GetIsolate()));

if (::PyMapping_Check(obj.ptr()) &&
::PyMapping_HasKeyString(obj.ptr(), *name))
{
py::object result(py::handle<>(::PyMapping_GetItemString(obj.ptr(), *name)));

if (!result.is_none()) CALLBACK_RETURN(Wrap(result));
}

PyObject *value = ::PyObject_GetAttrString(obj.ptr(), *name);

if (!value)
Expand All @@ -288,15 +296,7 @@ void CPythonObject::NamedGetter(v8::Local<v8::String> prop, const v8::PropertyCa
py::throw_error_already_set();
}
}

if (::PyMapping_Check(obj.ptr()) &&
::PyMapping_HasKeyString(obj.ptr(), *name))
{
py::object result(py::handle<>(::PyMapping_GetItemString(obj.ptr(), *name)));

if (!result.is_none()) CALLBACK_RETURN(Wrap(result));
}


CALLBACK_RETURN(v8::Handle<v8::Value>());
}

Expand Down