mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-14 08:02:11 +00:00
Improve Rust implementation
- Move mmap_file implementation into Rust - Introduce Utf8CStr as the better c-string type to use
This commit is contained in:
@@ -45,10 +45,8 @@ struct mmap_data : public byte_data {
|
||||
ALLOW_MOVE_ONLY(mmap_data)
|
||||
|
||||
explicit mmap_data(const char *name, bool rw = false);
|
||||
mmap_data(int fd, size_t sz, bool rw = false) { init(fd, sz, rw); }
|
||||
mmap_data(int fd, size_t sz, bool rw = false);
|
||||
~mmap_data();
|
||||
private:
|
||||
void init(int fd, size_t sz, bool rw);
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user