summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-03-12 15:50:20 -0600
committerBrian Paul <[email protected]>2015-03-13 08:03:43 -0600
commit558dcd877095a27ce5de8198744f2f95ddf66b2a (patch)
treeb15c8c7f033559f715447f450dba64bb0d074576 /src/gallium
parentd24a20e967303e1172928937fb7f96f010d4a99c (diff)
util: convert slab macros to inline functions
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_slab.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_slab.h b/src/gallium/auxiliary/util/u_slab.h
index 29d0252ba1b..0df039bcd57 100644
--- a/src/gallium/auxiliary/util/u_slab.h
+++ b/src/gallium/auxiliary/util/u_slab.h
@@ -81,7 +81,16 @@ void util_slab_destroy(struct util_slab_mempool *pool);
void util_slab_set_thread_safety(struct util_slab_mempool *pool,
enum util_slab_threading threading);
-#define util_slab_alloc(pool) (pool)->alloc(pool)
-#define util_slab_free(pool, ptr) (pool)->free(pool, ptr)
+static inline void *
+util_slab_alloc(struct util_slab_mempool *pool)
+{
+ return pool->alloc(pool);
+}
+
+static inline void
+util_slab_free(struct util_slab_mempool *pool, void *ptr)
+{
+ pool->free(pool, ptr);
+}
#endif