-#define fastpath2(size,endian,signed,type,rval) \
- CAMLprim value \
- ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \
- (value strv, value offv, value rv) \
- { \
- type *ptr = (type *) ((void *) String_val (strv) + Int_val (offv)); \
- type r; \
- memcpy(&r, ptr, sizeof(r)); \
- swap_##endian(size,r); \
- rval(rv) = r; \
- return rv; \
- }
-
-fastpath2(32,be,unsigned,uint32_t,Int32_val)
-fastpath2(32,le,unsigned,uint32_t,Int32_val)
-fastpath2(32,ne,unsigned,uint32_t,Int32_val)
-fastpath2(32,be,signed,int32_t,Int32_val)
-fastpath2(32,le,signed,int32_t,Int32_val)
-fastpath2(32,ne,signed,int32_t,Int32_val)
-
-/* Special care needs to be taken on ARCH_ALIGN_INT64 platforms
- (hppa and sparc in Debian). */
-
-#ifdef ARCH_ALIGN_INT64
-#include <caml/memory.h>
-#include <caml/alloc.h>
-#define fastpath3(size,endian,signed,type,rval) \