Skip to content

Commit

Permalink
Update serializer.c
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed May 29, 2024
1 parent 9c2be61 commit 740bc76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ void execute_user_callback(user_serializer_callback *user_callback_info,
Py_ssize_t len;

py_val = (char *)PyUnicode_AsUTF8AndSize(py_return, &len);
uint8_t* heap_b = (uint8_t *)malloc((uint32_t)len);
memcpy(heap_b, py_val, b_len);
uint8_t* heap_b = (uint8_t *)malloc((uint32_t) len);
memcpy(heap_b, py_val, (uint32_t) len);
as_bytes_init_wrap(*bytes, heap_b, (int32_t) len, allocate_buffer);

Py_DECREF(py_return);
Expand Down

0 comments on commit 740bc76

Please sign in to comment.