You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
390 B
18 lines
390 B
|
|
#include <shuffle3.h>
|
|
#include <reinterpret.hpp>
|
|
#include <map.h>
|
|
|
|
|
|
extern "C" void* map_and_then(const char* file, map_cb callback, void* user)
|
|
{
|
|
mm::mmap map(file);
|
|
return callback(std::as_const(map).as_raw(), user);
|
|
}
|
|
|
|
extern "C" void* map_fd_and_then(int fd, map_cb callback, void* user)
|
|
{
|
|
auto map = mm::mmap::map_raw_fd(fd);
|
|
return callback(std::as_const(map).as_raw(), user);
|
|
}
|