avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1551936 - in /avro/trunk: CHANGES.txt lang/c/jansson/src/hashtable.h lang/c/jansson/src/jansson.h lang/c/jansson/src/jansson_private.h lang/c/jansson/src/strbuffer.h lang/c/jansson/src/utf.h lang/c/src/dump.h lang/c/src/st.h
Date Wed, 18 Dec 2013 13:25:34 GMT
Author: dcreager
Date: Wed Dec 18 13:25:34 2013
New Revision: 1551936

URL: http://svn.apache.org/r1551936
Log:
AVRO-1358. C: Hide symbols that aren't part of the public API.

Right now we're doing this via GCC visibility pragmas.  The only symbols that
should be exported by libavro.so begin with `avro_` or `AVRO_`.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/jansson/src/hashtable.h
    avro/trunk/lang/c/jansson/src/jansson.h
    avro/trunk/lang/c/jansson/src/jansson_private.h
    avro/trunk/lang/c/jansson/src/strbuffer.h
    avro/trunk/lang/c/jansson/src/utf.h
    avro/trunk/lang/c/src/dump.h
    avro/trunk/lang/c/src/st.h

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed Dec 18 13:25:34 2013
@@ -77,6 +77,8 @@ Trunk (not yet released)
     AVRO-1410. Explicit version specification in pom prevents dependency
     management. (Eric Sammer via tomwhite)
 
+    AVRO-1358. C: Hide symbols that aren't in the public API. (dcreager)
+
 Avro 1.7.5 (12 August 2013)
 
   NEW FEATURES

Modified: avro/trunk/lang/c/jansson/src/hashtable.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/src/hashtable.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/jansson/src/hashtable.h (original)
+++ avro/trunk/lang/c/jansson/src/hashtable.h Wed Dec 18 13:25:34 2013
@@ -14,6 +14,8 @@ extern "C" {
 #define CLOSE_EXTERN
 #endif
 
+#pragma GCC visibility push(hidden)
+
 typedef size_t (*key_hash_fn)(const void *key);
 typedef int (*key_cmp_fn)(const void *key1, const void *key2);
 typedef void (*free_fn)(void *key);
@@ -210,5 +212,7 @@ void *hashtable_iter_value(void *iter);
  */
 void hashtable_iter_set(hashtable_t *hashtable, void *iter, void *value);
 
+#pragma GCC visibility pop
+
 CLOSE_EXTERN
 #endif

Modified: avro/trunk/lang/c/jansson/src/jansson.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/src/jansson.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/jansson/src/jansson.h (original)
+++ avro/trunk/lang/c/jansson/src/jansson.h Wed Dec 18 13:25:34 2013
@@ -18,6 +18,8 @@
 extern "C" {
 #endif
 
+#pragma GCC visibility push(hidden)
+
 /* version */
 
 #define JANSSON_MAJOR_VERSION  2
@@ -246,6 +248,8 @@ typedef void (*json_free_t)(void *);
 
 void json_set_alloc_funcs(json_malloc_t malloc_fn, json_free_t free_fn);
 
+#pragma GCC visibility pop
+
 #ifdef __cplusplus
 }
 #endif

Modified: avro/trunk/lang/c/jansson/src/jansson_private.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/src/jansson_private.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/jansson/src/jansson_private.h (original)
+++ avro/trunk/lang/c/jansson/src/jansson_private.h Wed Dec 18 13:25:34 2013
@@ -18,6 +18,8 @@ extern "C" {
 #include "jansson.h"
 #include "hashtable.h"
 
+#pragma GCC visibility push(hidden)
+
 #ifdef _WIN32
 #define snprintf _snprintf
 #endif
@@ -98,5 +100,7 @@ void* jsonp_malloc(size_t size);
 void jsonp_free(void *ptr);
 char *jsonp_strdup(const char *str);
 
+#pragma GCC visibility pop
+
 CLOSE_EXTERN
 #endif

Modified: avro/trunk/lang/c/jansson/src/strbuffer.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/src/strbuffer.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/jansson/src/strbuffer.h (original)
+++ avro/trunk/lang/c/jansson/src/strbuffer.h Wed Dec 18 13:25:34 2013
@@ -14,6 +14,8 @@ extern "C" {
 #define CLOSE_EXTERN
 #endif
 
+#pragma GCC visibility push(hidden)
+
 typedef struct {
     char *value;
     int length;   /* bytes used */
@@ -34,5 +36,7 @@ int strbuffer_append_bytes(strbuffer_t *
 
 char strbuffer_pop(strbuffer_t *strbuff);
 
+#pragma GCC visibility pop
+
 CLOSE_EXTERN
 #endif

Modified: avro/trunk/lang/c/jansson/src/utf.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/src/utf.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/jansson/src/utf.h (original)
+++ avro/trunk/lang/c/jansson/src/utf.h Wed Dec 18 13:25:34 2013
@@ -34,6 +34,8 @@ typedef int int32_t;
 
 #endif /* HAVE_CONFIG_H */
 
+#pragma GCC visibility push(hidden)
+
 int utf8_encode(int32_t codepoint, char *buffer, int *size);
 
 int utf8_check_first(char byte);
@@ -42,5 +44,7 @@ const char *utf8_iterate(const char *buf
 
 int utf8_check_string(const char *string, int length);
 
+#pragma GCC visibility pop
+
 CLOSE_EXTERN
 #endif

Modified: avro/trunk/lang/c/src/dump.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/dump.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/src/dump.h (original)
+++ avro/trunk/lang/c/src/dump.h Wed Dec 18 13:25:34 2013
@@ -26,7 +26,9 @@ extern "C" {
 
 #include <stdio.h>
 
+#pragma GCC visibility push(hidden)
 void dump(FILE * out, const char *addr, const long len);
+#pragma GCC visibility pop
 
 CLOSE_EXTERN
 #endif

Modified: avro/trunk/lang/c/src/st.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/st.h?rev=1551936&r1=1551935&r2=1551936&view=diff
==============================================================================
--- avro/trunk/lang/c/src/st.h (original)
+++ avro/trunk/lang/c/src/st.h Wed Dec 18 13:25:34 2013
@@ -18,6 +18,8 @@ extern "C" {
 
 #include <avro/platform.h>		/* for uintptr_t */
 
+#pragma GCC visibility push(hidden)
+
 #ifndef ANYARGS
  #ifdef __cplusplus
    #define ANYARGS ...
@@ -79,5 +81,7 @@ st_table *st_copy _((st_table *));
 
 int st_strhash();
 
+#pragma GCC visibility pop
+
 CLOSE_EXTERN
 #endif				/* ST_INCLUDED */



Mime
View raw message