File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,14 @@ unpack_int32(const char *buf)
163
163
return (int32_t )apg_ntoh32 (nx );
164
164
}
165
165
166
+ static inline uint32_t
167
+ unpack_uint32 (const char * buf )
168
+ {
169
+ uint32_t nx ;
170
+ memcpy ((char * )& nx , buf , sizeof (uint32_t ));
171
+ return (uint32_t )apg_ntoh32 (nx );
172
+ }
173
+
166
174
167
175
static inline int64_t
168
176
unpack_int64 (const char * buf )
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ cdef extern from "./hton.h":
16
16
cdef void pack_double(char * buf, double f);
17
17
cdef int16_t unpack_int16(const char * buf);
18
18
cdef int32_t unpack_int32(const char * buf);
19
+ cdef uint32_t unpack_uint32(const char * buf);
19
20
cdef int64_t unpack_int64(const char * buf);
20
21
cdef float unpack_float(const char * buf);
21
22
cdef double unpack_double(const char * buf);
You can’t perform that action at this time.
0 commit comments