We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 635e04a commit aca615cCopy full SHA for aca615c
uuid.pyx
@@ -1,7 +1,7 @@
1
import functools
2
import uuid
3
4
-from libc.stdint cimport uint64_t, uint8_t
+from libc.stdint cimport uint64_t, uint8_t, int8_t
5
from libc.string cimport memcpy
6
7
@@ -40,7 +40,7 @@ cdef inline char i64_to_hex(uint64_t num, char *s):
40
return 0
41
42
43
-cdef pg_uuid_from_buf(char *buf):
+cdef pg_uuid_from_buf(const char *buf):
44
cdef:
45
PgBaseUUID u = UUID.__new__(UUID)
46
memcpy(u._data, buf, 16)
@@ -69,7 +69,7 @@ cdef pg_uuid_bytes_from_str(str u, char *out):
69
if ch == <unsigned char>b'-':
70
continue
71
72
- part = _hextable[ch]
+ part = <uint8_t><int8_t>_hextable[ch]
73
if part == <uint8_t>-1:
74
if ch >= 0x20 and ch <= 0x7e:
75
raise ValueError(
0 commit comments