Skip to content

Commit

Permalink
Merge pull request mongodb#117 from ajdavis/bson-code-with-scope-fix
Browse files Browse the repository at this point in the history
Fix bug serializing code objects w/ scope
  • Loading branch information
behackett committed Mar 30, 2012
2 parents 49a748e + 6aebf11 commit 68da94c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bson/_cbsonmodule.c
Expand Up @@ -506,7 +506,7 @@ static int _write_element_to_buffer(PyObject* self, buffer_t buffer, int type_by
return 0;
}

if (!PyObject_Size(scope)) {
if (!PyDict_Size(scope)) {
Py_DECREF(scope);

*(buffer_get_buffer(buffer) + type_byte) = 0x0D;
Expand Down

0 comments on commit 68da94c

Please sign in to comment.