Skip to content

Commit 340efb9

Browse files
committed
MS VC++ compatibility PYTHON-387
1 parent 638bb7f commit 340efb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bson/_cbsonmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ static int _write_element_to_buffer(PyObject* self, buffer_t buffer, int type_by
476476
} else if (state->UUID && PyObject_IsInstance(value, state->UUID)) {
477477
// Just a special case of Binary above, but simpler to do as a separate case
478478

479+
PyObject* bytes;
480+
479481
// Could be bytes, bytearray, str...
480482
const char* binarr;
481483
// UUID is always 16 bytes
@@ -488,8 +490,6 @@ static int _write_element_to_buffer(PyObject* self, buffer_t buffer, int type_by
488490
subtype = (char)uuid_subtype;
489491
}
490492

491-
PyObject* bytes;
492-
493493
*(buffer_get_buffer(buffer) + type_byte) = 0x05;
494494
if (!buffer_write_bytes(buffer, (const char*)&length, 4)) {
495495
return 0;

0 commit comments

Comments
 (0)