projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d5fa34
)
util: Add a func_to_pointer util function too.
author
José Fonseca
<jfonseca@vmware.com>
Thu, 10 Jun 2010 15:22:49 +0000
(16:22 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Mon, 14 Jun 2010 15:50:39 +0000
(16:50 +0100)
src/gallium/auxiliary/util/u_pointer.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_pointer.h
b/src/gallium/auxiliary/util/u_pointer.h
index ae6f43bff875c56d05e899691589eb4e70e15e1c..cce0c7430e78953ea99cc98838b8dea9d5608c90 100644
(file)
--- 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
}