[PATCH libdrm 07/24] radeon: annotate the private symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxx>
Cc: Michel Dänzer <michel.daenzer@xxxxxxx>
Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
---
 radeon/bof.c | 22 +++++++++++++---------
 radeon/bof.h | 23 ++++++++++++++---------
 2 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/radeon/bof.c b/radeon/bof.c
index 92f4b91..2b29b89 100644
--- a/radeon/bof.c
+++ b/radeon/bof.c
@@ -23,6 +23,10 @@
  * Authors:
  *      Jerome Glisse
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
@@ -50,7 +54,7 @@ static void bof_incref(bof_t *bof)
 	bof->refcount++;
 }
 
-void bof_decref(bof_t *bof)
+drm_private void bof_decref(bof_t *bof)
 {
 	unsigned i;
 
@@ -96,7 +100,7 @@ static bof_t *bof_string(const char *value)
 /*
  * object 
  */
-bof_t *bof_object(void)
+drm_private bof_t *bof_object(void)
 {
 	bof_t *object;
 
@@ -109,7 +113,7 @@ bof_t *bof_object(void)
 	return object;
 }
 
-int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
+drm_private int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
 {
 	bof_t *key;
 	int r;
@@ -133,7 +137,7 @@ int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
 /*
  * array
  */
-bof_t *bof_array(void)
+drm_private bof_t *bof_array(void)
 {
 	bof_t *array = bof_object();
 
@@ -144,7 +148,7 @@ bof_t *bof_array(void)
 	return array;
 }
 
-int bof_array_append(bof_t *array, bof_t *value)
+drm_private int bof_array_append(bof_t *array, bof_t *value)
 {
 	int r;
 	if (array->type != BOF_TYPE_ARRAY)
@@ -161,7 +165,7 @@ int bof_array_append(bof_t *array, bof_t *value)
 /*
  * blob
  */
-bof_t *bof_blob(unsigned size, void *value)
+drm_private bof_t *bof_blob(unsigned size, void *value)
 {
 	bof_t *blob = bof_object();
 
@@ -182,7 +186,7 @@ bof_t *bof_blob(unsigned size, void *value)
 /*
  *  int32
  */
-bof_t *bof_int32(int32_t value)
+drm_private bof_t *bof_int32(int32_t value)
 {
 	bof_t *int32 = bof_object();
 
@@ -200,7 +204,7 @@ bof_t *bof_int32(int32_t value)
 	return int32;
 }
 
-int32_t bof_int32_value(bof_t *bof)
+drm_private int32_t bof_int32_value(bof_t *bof)
 {
 	return *((uint32_t*)bof->value);
 }
@@ -245,7 +249,7 @@ static int bof_file_write(bof_t *bof, FILE *file)
 	return 0;
 }
 
-int bof_dump_file(bof_t *bof, const char *filename)
+drm_private int bof_dump_file(bof_t *bof, const char *filename)
 {
 	unsigned i;
 	int r = 0;
diff --git a/radeon/bof.h b/radeon/bof.h
index 8108dd5..b7632b4 100644
--- a/radeon/bof.h
+++ b/radeon/bof.h
@@ -26,8 +26,13 @@
 #ifndef BOF_H
 #define BOF_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdint.h>
+#include "libdrm.h"
 
 #define BOF_TYPE_STRING		0
 #define BOF_TYPE_NULL		1
@@ -52,19 +57,19 @@ typedef struct bof {
 } bof_t;
 
 /* object */
-extern bof_t *bof_object(void);
-extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
+drm_private extern bof_t *bof_object(void);
+drm_private extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
 /* array */
-extern bof_t *bof_array(void);
-extern int bof_array_append(bof_t *array, bof_t *value);
+drm_private extern bof_t *bof_array(void);
+drm_private extern int bof_array_append(bof_t *array, bof_t *value);
 /* blob */
-extern bof_t *bof_blob(unsigned size, void *value);
+drm_private extern bof_t *bof_blob(unsigned size, void *value);
 /* int32 */
-extern bof_t *bof_int32(int32_t value);
-extern int32_t bof_int32_value(bof_t *bof);
+drm_private extern bof_t *bof_int32(int32_t value);
+drm_private extern int32_t bof_int32_value(bof_t *bof);
 /* common functions */
-extern void bof_decref(bof_t *bof);
-extern int bof_dump_file(bof_t *bof, const char *filename);
+drm_private extern void bof_decref(bof_t *bof);
+drm_private extern int bof_dump_file(bof_t *bof, const char *filename);
 
 static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
 static inline int bof_is_blob(bof_t *bof){return (bof->type == BOF_TYPE_BLOB);}
-- 
2.3.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux