diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2006-07-25 15:27:31 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2006-07-26 15:48:51 -0700 |
commit | 377a581ddf5e428a368efb1b59fcb317666fecdd (patch) | |
tree | 73b0df492e4a6ba8ad6da3ff8fa4717987eb295c /fb | |
parent | a4005c15fbb48231cb958c32b2c791a2d23a135a (diff) |
Switch to using void* pointers.
Pass the size of the data pointed to by src or dst as an argument to
wfb{Read,Write}Memory. This allows one set of macros to be used with any size
pointer. Assumes that sizeof(FbBits) >= sizeof(FbStip).
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fb.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -47,8 +47,8 @@ #ifdef FB_ACCESS_WRAPPER #include "wfbrename.h" #define FBPREFIX(x) wfb##x -#define WRITE(ptr, val) ((*wfbWriteMemory)(ptr, val)) -#define READ(ptr) ((*wfbReadMemory)(ptr)) +#define WRITE(ptr, val) ((*wfbWriteMemory)(ptr, val, sizeof(*ptr))) +#define READ(ptr) ((*wfbReadMemory)(ptr, sizeof(*ptr))) #else #define FBPREFIX(x) fb##x #define WRITE(ptr, val) (*(ptr) = (val)) @@ -601,8 +601,8 @@ extern WindowPtr *WindowTable; /* Framebuffer access wrapper */ #ifdef FB_ACCESS_WRAPPER -typedef FbBits (*ReadMemoryProcPtr)(FbBits *src); -typedef void (*WriteMemoryProcPtr)(FbBits *dst, FbBits value); +typedef FbBits (*ReadMemoryProcPtr)(void *src, int size); +typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size); typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, PixmapPtr pPixmap); |