diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-04-10 17:28:56 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-04-12 21:51:50 +0200 |
commit | 3bad98147f84f2606afe2afb9d80ea15d3e1c39f (patch) | |
tree | eb38c258e5a86958a8868289b7f23ddc95fb82da /cpu-common.h | |
parent | f50ee4e0749604373bfd3bf3bb1d94c28787a378 (diff) |
cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write
A lot of calls don't operate on bytes but on words or on structured data.
So instead of a pointer to uint8_t, a void pointer is the better choice.
This allows removing many type casts.
(Some very early implementations of memcpy used char pointers
which were replaced by void pointers for the same reason).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'cpu-common.h')
-rw-r--r-- | cpu-common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpu-common.h b/cpu-common.h index ef4e8dab7a..96c02aeb64 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -68,14 +68,14 @@ void cpu_unregister_io_memory(int table_address); void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, int len, int is_write); static inline void cpu_physical_memory_read(target_phys_addr_t addr, - uint8_t *buf, int len) + void *buf, int len) { cpu_physical_memory_rw(addr, buf, len, 0); } static inline void cpu_physical_memory_write(target_phys_addr_t addr, - const uint8_t *buf, int len) + const void *buf, int len) { - cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1); + cpu_physical_memory_rw(addr, (void *)buf, len, 1); } void *cpu_physical_memory_map(target_phys_addr_t addr, target_phys_addr_t *plen, |