Skip to content

Commit

Permalink
Fixes in addr_to_element
Browse files Browse the repository at this point in the history
  • Loading branch information
ateska committed Mar 22, 2024
1 parent 12e5782 commit 20dd430
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cysimdjson/cysimdjson.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ cdef extern from "jsoninter.h":

cdef const char * PyUnicode_AsUTF8AndSize(object, Py_ssize_t *)

cdef simdjson_element extract_element(void *)
cdef simdjson_element extract_element(void *) except + simdjson_error_handler
cdef size_t element_addrof(simdjson_element & value)


Expand Down Expand Up @@ -474,9 +474,7 @@ cdef public api object cysimdjson_addr_to_element(void * element):


def addr_to_element(element_addr: int):
cdef char * e = NULL
e += <size_t>element_addr
cdef simdjson_element v = extract_element(e)
cdef simdjson_element v = extract_element(<void *><size_t>element_addr)
return JSONElement.from_element(v)


Expand Down

0 comments on commit 20dd430

Please sign in to comment.