gallium/u_dump: export util_dump_ptr
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 22 Oct 2017 15:38:55 +0000 (17:38 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 9 Nov 2017 13:01:02 +0000 (14:01 +0100)
Change format to %p while we're at it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_dump.h
src/gallium/auxiliary/util/u_dump_state.c

index 3fa253e511f4604cb6a623e50f6e86d899968393..ff1325e1147a326fc720d0a4ccad50b207e11d54 100644 (file)
@@ -90,6 +90,9 @@ util_str_query_value_type(unsigned value, boolean shortened);
 const char *
 util_str_prim_mode(unsigned value, boolean shortened);
 
+void
+util_dump_ptr(FILE *stream, const void *value);
+
 void
 util_dump_query_type(FILE *stream, unsigned value);
 
index c263021a9f6d0ab6b9d505cb243a9ac8dd7a412e..cef82a314f1761c4544ce265a4fdaacadba538e9 100644 (file)
@@ -142,11 +142,11 @@ util_dump_null(FILE *stream)
    fputs("NULL", stream);
 }
 
-static void
+void
 util_dump_ptr(FILE *stream, const void *value)
 {
    if(value)
-      util_stream_writef(stream, "0x%08lx", (unsigned long)(uintptr_t)value);
+      util_stream_writef(stream, "%p", value);
    else
       util_dump_null(stream);
 }