At 11:44 AM 1/9/2003, you wrote: >William A. Rowe, Jr. wrote: > >>In that case... what about a trick (I believe) Ben Laurie taught us? >>Using a typedef for clarity: >> >>typedef void*(*apr_atomic_casptr_fn_t)(unsigned long* mem, unsigned long cmp, >>unsigned long with); >> >>#define apr_atomic_casptr ((apr_atomic_casptr_fn_t)(atomic_cmpxchg)) >> >>In this way, the arguments to apr_atomic_casptr will be evaluated in terms >>of the apr_atomic_casptr_fn_t declaration. >> >>This presumes the arguments exactly match the atomic_cmpxchg function, with >>the exception of twos-compliment signedness. >> >>Make sense? > >I like the typedef approach, but shouldn't it be > >typedef void*(*apr_atomic_casptr_fn_t)(void** mem, const void *cmp, const void >*with); > >since casptr operates on pointers rather than ints?
I wondered the same, I was just convoluting the existing macro... Bill