diff options
-rw-r--r-- | src/gallium/auxiliary/util/u_pointer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_pointer.h b/src/gallium/auxiliary/util/u_pointer.h index ae6f43bff87..cce0c7430e7 100644 --- a/src/gallium/auxiliary/util/u_pointer.h +++ b/src/gallium/auxiliary/util/u_pointer.h @@ -111,6 +111,17 @@ pointer_to_func( void *p ) return pf.f; } +static INLINE void * +func_to_pointer( func_pointer f ) +{ + union { + void *p; + func_pointer f; + } pf; + pf.f = f; + return pf.p; +} + #ifdef __cplusplus } |