Apply suggestions from code review

Co-authored-by: Jib <Jibzade@gmail.com>
This commit is contained in:
Jib 2026-04-01 11:20:15 -04:00 committed by GitHub
parent e252ccc8aa
commit 2f301ea7c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -155,4 +155,3 @@ char* pymongo_buffer_get_buffer(buffer_t buffer) {
void pymongo_buffer_update_position(buffer_t buffer, buffer_position new_position) {
buffer->position = new_position;
}

View File

@ -333,6 +333,7 @@ fail:
return result;
}
static void
_set_document_too_large(int size, long max) {
PyObject* DocumentTooLarge = _error("DocumentTooLarge");
@ -351,6 +352,7 @@ _set_document_too_large(int size, long max) {
#define _DELETE 2
/* OP_MSG ----------------------------------------------- */
static int
_batched_op_msg(
unsigned char op, unsigned char ack,
@ -656,6 +658,7 @@ fail:
}
/* End OP_MSG -------------------------------------------- */
static int
_batched_write_command(
char* ns, Py_ssize_t ns_len, unsigned char op,
@ -859,6 +862,7 @@ fail:
Py_XDECREF(iterator);
return 0;
}
static PyObject*
_cbson_encode_batched_write_command(PyObject* self, PyObject* args) {
char *ns = NULL;
@ -1013,6 +1017,7 @@ fail:
INITERROR;
}
static PyModuleDef_Slot _cmessage_slots[] = {
{Py_mod_exec, _cmessage_exec},
#ifdef Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED
@ -1024,6 +1029,7 @@ static PyModuleDef_Slot _cmessage_slots[] = {
{0, NULL},
};
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"_cmessage",
@ -1040,3 +1046,4 @@ PyMODINIT_FUNC
PyInit__cmessage(void)
{
return PyModuleDef_Init(&moduledef);
}