ewah: fix constness of ewah_read_mmap

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy 2014-04-28 17:55:22 +07:00 committed by Junio C Hamano
parent d8779e1e25
commit a0a2f7d79c
2 changed files with 3 additions and 3 deletions

View File

@ -110,9 +110,9 @@ int ewah_serialize(struct ewah_bitmap *self, int fd)
return ewah_serialize_to(self, write_helper, (void *)(intptr_t)fd); return ewah_serialize_to(self, write_helper, (void *)(intptr_t)fd);
} }


int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len) int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len)
{ {
uint8_t *ptr = map; const uint8_t *ptr = map;
size_t i; size_t i;


self->bit_size = get_be32(ptr); self->bit_size = get_be32(ptr);

View File

@ -99,7 +99,7 @@ int ewah_serialize(struct ewah_bitmap *self, int fd);
int ewah_serialize_native(struct ewah_bitmap *self, int fd); int ewah_serialize_native(struct ewah_bitmap *self, int fd);


int ewah_deserialize(struct ewah_bitmap *self, int fd); int ewah_deserialize(struct ewah_bitmap *self, int fd);
int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len); int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len);
int ewah_read_mmap_native(struct ewah_bitmap *self, void *map, size_t len); int ewah_read_mmap_native(struct ewah_bitmap *self, void *map, size_t len);


uint32_t ewah_checksum(struct ewah_bitmap *self); uint32_t ewah_checksum(struct ewah_bitmap *self);