qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject [4/5] qpid-proton git commit: PROTON-250: Fix misc symbol visibility issues: - Hide all library internal only symbols - Make log.h export only unmangled C symbols
Date Mon, 15 Feb 2016 20:12:37 GMT
PROTON-250: Fix misc symbol visibility issues:
- Hide all library internal only symbols
- Make log.h export only unmangled C symbols


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/874d85b2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/874d85b2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/874d85b2

Branch: refs/heads/master
Commit: 874d85b2d6ec53e4ca9e75c3018862f84cf18300
Parents: 525fad9
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Fri Feb 12 01:00:13 2016 -0500
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Mon Feb 15 15:05:06 2016 -0500

----------------------------------------------------------------------
 proton-c/include/proton/log.h      | 14 +++++++++++---
 proton-c/src/buffer.h              | 30 ++++++++++++++---------------
 proton-c/src/framing/framing.h     |  4 ++--
 proton-c/src/log_private.h         |  6 +++---
 proton-c/src/messenger/messenger.c |  8 ++++----
 proton-c/src/url.c                 | 34 ++++++++++++++++-----------------
 proton-c/src/util.h                |  8 ++++----
 7 files changed, 56 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/include/proton/log.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/log.h b/proton-c/include/proton/log.h
index a194e8c..1387df5 100644
--- a/proton-c/include/proton/log.h
+++ b/proton-c/include/proton/log.h
@@ -19,15 +19,19 @@
  * under the License.
  */
 
+#include <proton/import_export.h>
+#include <proton/type_compat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@file
  *
  * Control log messages that are not associated with a transport.
  * See pn_transport_trace for transport-related logging.
  */
 
-#include <proton/import_export.h>
-#include <proton/type_compat.h>
-
 /** Callback for customized logging. */
 typedef void (*pn_logger_t)(const char *message);
 
@@ -47,4 +51,8 @@ PN_EXTERN void pn_log_enable(bool enabled);
  */
 PN_EXTERN void pn_log_logger(pn_logger_t logger);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/buffer.h
----------------------------------------------------------------------
diff --git a/proton-c/src/buffer.h b/proton-c/src/buffer.h
index 26d4bb3..94d48ac 100644
--- a/proton-c/src/buffer.h
+++ b/proton-c/src/buffer.h
@@ -36,21 +36,21 @@ typedef struct {
 
 typedef struct pn_buffer_t pn_buffer_t;
 
-PN_EXTERN pn_buffer_t *pn_buffer(size_t capacity);
-PN_EXTERN void pn_buffer_free(pn_buffer_t *buf);
-PN_EXTERN size_t pn_buffer_size(pn_buffer_t *buf);
-PN_EXTERN size_t pn_buffer_capacity(pn_buffer_t *buf);
-PN_EXTERN size_t pn_buffer_available(pn_buffer_t *buf);
-PN_EXTERN int pn_buffer_ensure(pn_buffer_t *buf, size_t size);
-PN_EXTERN int pn_buffer_append(pn_buffer_t *buf, const char *bytes, size_t size);
-PN_EXTERN int pn_buffer_prepend(pn_buffer_t *buf, const char *bytes, size_t size);
-PN_EXTERN size_t pn_buffer_get(pn_buffer_t *buf, size_t offset, size_t size, char *dst);
-PN_EXTERN int pn_buffer_trim(pn_buffer_t *buf, size_t left, size_t right);
-PN_EXTERN void pn_buffer_clear(pn_buffer_t *buf);
-PN_EXTERN int pn_buffer_defrag(pn_buffer_t *buf);
-PN_EXTERN pn_bytes_t pn_buffer_bytes(pn_buffer_t *buf);
-PN_EXTERN pn_buffer_memory_t pn_buffer_memory(pn_buffer_t *buf);
-PN_EXTERN int pn_buffer_print(pn_buffer_t *buf);
+pn_buffer_t *pn_buffer(size_t capacity);
+void pn_buffer_free(pn_buffer_t *buf);
+size_t pn_buffer_size(pn_buffer_t *buf);
+size_t pn_buffer_capacity(pn_buffer_t *buf);
+size_t pn_buffer_available(pn_buffer_t *buf);
+int pn_buffer_ensure(pn_buffer_t *buf, size_t size);
+int pn_buffer_append(pn_buffer_t *buf, const char *bytes, size_t size);
+int pn_buffer_prepend(pn_buffer_t *buf, const char *bytes, size_t size);
+size_t pn_buffer_get(pn_buffer_t *buf, size_t offset, size_t size, char *dst);
+int pn_buffer_trim(pn_buffer_t *buf, size_t left, size_t right);
+void pn_buffer_clear(pn_buffer_t *buf);
+int pn_buffer_defrag(pn_buffer_t *buf);
+pn_bytes_t pn_buffer_bytes(pn_buffer_t *buf);
+pn_buffer_memory_t pn_buffer_memory(pn_buffer_t *buf);
+int pn_buffer_print(pn_buffer_t *buf);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/framing/framing.h
----------------------------------------------------------------------
diff --git a/proton-c/src/framing/framing.h b/proton-c/src/framing/framing.h
index 9849fef..6033867 100644
--- a/proton-c/src/framing/framing.h
+++ b/proton-c/src/framing/framing.h
@@ -42,8 +42,8 @@ typedef struct {
   const char *payload;
 } pn_frame_t;
 
-PN_EXTERN ssize_t pn_read_frame(pn_frame_t *frame, const char *bytes, size_t available, uint32_t
max);
-PN_EXTERN size_t pn_write_frame(char *bytes, size_t size, pn_frame_t frame);
+ssize_t pn_read_frame(pn_frame_t *frame, const char *bytes, size_t available, uint32_t max);
+size_t pn_write_frame(char *bytes, size_t size, pn_frame_t frame);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/log_private.h
----------------------------------------------------------------------
diff --git a/proton-c/src/log_private.h b/proton-c/src/log_private.h
index 828e189..4725045 100644
--- a/proton-c/src/log_private.h
+++ b/proton-c/src/log_private.h
@@ -42,12 +42,12 @@
     } while(0)
 
 /** Return true if logging is enabled. */
-PN_EXTERN bool pn_log_enabled(void);
+bool pn_log_enabled(void);
 
 /**@internal*/
-PN_EXTERN void pn_logf_impl(const char* fmt, ...);
+void pn_logf_impl(const char* fmt, ...);
 /**@internal*/
-PN_EXTERN void pn_vlogf_impl(const char *fmt, va_list ap);
+void pn_vlogf_impl(const char *fmt, va_list ap);
 
 
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/messenger/messenger.c
----------------------------------------------------------------------
diff --git a/proton-c/src/messenger/messenger.c b/proton-c/src/messenger/messenger.c
index cd6585b..a376988 100644
--- a/proton-c/src/messenger/messenger.c
+++ b/proton-c/src/messenger/messenger.c
@@ -1699,7 +1699,7 @@ pn_connection_t *pn_messenger_resolve(pn_messenger_t *messenger, const
char *add
   return connection;
 }
 
-PN_EXTERN pn_link_t *pn_messenger_get_link(pn_messenger_t *messenger,
+pn_link_t *pn_messenger_get_link(pn_messenger_t *messenger,
                                            const char *address, bool sender)
 {
   char *name = NULL;
@@ -2292,7 +2292,7 @@ int pn_messenger_reject(pn_messenger_t *messenger, pn_tracker_t tracker,
int fla
                           PN_STATUS_REJECTED, flags, false, false);
 }
 
-PN_EXTERN pn_link_t *pn_messenger_tracker_link(pn_messenger_t *messenger,
+pn_link_t *pn_messenger_tracker_link(pn_messenger_t *messenger,
                                                pn_tracker_t tracker)
 {
   pni_store_t *store = pn_tracker_store(messenger, tracker);
@@ -2353,7 +2353,7 @@ int pn_messenger_rewrite(pn_messenger_t *messenger, const char *pattern,
const c
   return 0;
 }
 
-PN_EXTERN int pn_messenger_set_flags(pn_messenger_t *messenger, const int flags)
+int pn_messenger_set_flags(pn_messenger_t *messenger, const int flags)
 {
   if (!messenger)
     return PN_ARG_ERR;
@@ -2363,7 +2363,7 @@ PN_EXTERN int pn_messenger_set_flags(pn_messenger_t *messenger, const
int flags)
   return 0;
 }
 
-PN_EXTERN int pn_messenger_get_flags(pn_messenger_t *messenger)
+int pn_messenger_get_flags(pn_messenger_t *messenger)
 {
   return messenger ? messenger->flags : 0;
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/url.c
----------------------------------------------------------------------
diff --git a/proton-c/src/url.c b/proton-c/src/url.c
index 1e70f19..566e91e 100644
--- a/proton-c/src/url.c
+++ b/proton-c/src/url.c
@@ -85,7 +85,7 @@ static int pn_url_inspect(void *obj, pn_string_t *dst)
 #define pn_url_initialize NULL
 
 
-PN_EXTERN pn_url_t *pn_url() {
+pn_url_t *pn_url() {
     static const pn_class_t clazz = PN_CLASS(pn_url);
     pn_url_t *url = (pn_url_t*) pn_class_new(&clazz, sizeof(pn_url_t));
     if (!url) return NULL;
@@ -98,7 +98,7 @@ PN_EXTERN pn_url_t *pn_url() {
  *@param[in] url A URL string.
  *@return The parsed pn_url_t or NULL if url is not a valid URL string.
  */
-PN_EXTERN pn_url_t *pn_url_parse(const char *str) {
+pn_url_t *pn_url_parse(const char *str) {
     if (!str || !*str)          /* Empty string or NULL is illegal. */
         return NULL;
 
@@ -117,10 +117,10 @@ PN_EXTERN pn_url_t *pn_url_parse(const char *str) {
 }
 
 /** Free a URL */
-PN_EXTERN void pn_url_free(pn_url_t *url) { pn_free(url); }
+void pn_url_free(pn_url_t *url) { pn_free(url); }
 
 /** Clear the contents of the URL. */
-PN_EXTERN void pn_url_clear(pn_url_t *url) {
+void pn_url_clear(pn_url_t *url) {
     pn_url_set_scheme(url, NULL);
     pn_url_set_username(url, NULL);
     pn_url_set_password(url, NULL);
@@ -148,7 +148,7 @@ static void pni_urlencode(pn_string_t *dst, const char* src) {
 
 
 /** Return the string form of a URL. */
-PN_EXTERN const char *pn_url_str(pn_url_t *url) {
+const char *pn_url_str(pn_url_t *url) {
     if (pn_string_get(url->str) == NULL) {
         pn_string_set(url->str, "");
         if (url->scheme) pn_string_addf(url->str, "%s://", url->scheme);
@@ -168,19 +168,19 @@ PN_EXTERN const char *pn_url_str(pn_url_t *url) {
     return pn_string_get(url->str);
 }
 
-PN_EXTERN const char *pn_url_get_scheme(pn_url_t *url) { return url->scheme; }
-PN_EXTERN const char *pn_url_get_username(pn_url_t *url) { return url->username; }
-PN_EXTERN const char *pn_url_get_password(pn_url_t *url) { return url->password; }
-PN_EXTERN const char *pn_url_get_host(pn_url_t *url) { return url->host; }
-PN_EXTERN const char *pn_url_get_port(pn_url_t *url) { return url->port; }
-PN_EXTERN const char *pn_url_get_path(pn_url_t *url) { return url->path; }
+const char *pn_url_get_scheme(pn_url_t *url) { return url->scheme; }
+const char *pn_url_get_username(pn_url_t *url) { return url->username; }
+const char *pn_url_get_password(pn_url_t *url) { return url->password; }
+const char *pn_url_get_host(pn_url_t *url) { return url->host; }
+const char *pn_url_get_port(pn_url_t *url) { return url->port; }
+const char *pn_url_get_path(pn_url_t *url) { return url->path; }
 
 #define SET(part) free(url->part); url->part = copy(part); pn_string_clear(url->str)
-PN_EXTERN void pn_url_set_scheme(pn_url_t *url, const char *scheme) { SET(scheme); }
-PN_EXTERN void pn_url_set_username(pn_url_t *url, const char *username) { SET(username);
}
-PN_EXTERN void pn_url_set_password(pn_url_t *url, const char *password) { SET(password);
}
-PN_EXTERN void pn_url_set_host(pn_url_t *url, const char *host) { SET(host); }
-PN_EXTERN void pn_url_set_port(pn_url_t *url, const char *port) { SET(port); }
-PN_EXTERN void pn_url_set_path(pn_url_t *url, const char *path) { SET(path); }
+void pn_url_set_scheme(pn_url_t *url, const char *scheme) { SET(scheme); }
+void pn_url_set_username(pn_url_t *url, const char *username) { SET(username); }
+void pn_url_set_password(pn_url_t *url, const char *password) { SET(password); }
+void pn_url_set_host(pn_url_t *url, const char *host) { SET(host); }
+void pn_url_set_port(pn_url_t *url, const char *port) { SET(port); }
+void pn_url_set_path(pn_url_t *url, const char *path) { SET(path); }
 
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/874d85b2/proton-c/src/util.h
----------------------------------------------------------------------
diff --git a/proton-c/src/util.h b/proton-c/src/util.h
index 8973a07..ec59a07 100644
--- a/proton-c/src/util.h
+++ b/proton-c/src/util.h
@@ -32,13 +32,13 @@
 #include <proton/types.h>
 #include <proton/object.h>
 
-PN_EXTERN void pni_parse_url(char *url, char **scheme, char **user, char **pass, char **host,
char **port, char **path);
+void pni_parse_url(char *url, char **scheme, char **user, char **pass, char **host, char
**port, char **path);
 void pni_fatal(const char *fmt, ...);
 void pni_vfatal(const char *fmt, va_list ap);
-PN_EXTERN ssize_t pn_quote_data(char *dst, size_t capacity, const char *src, size_t size);
+ssize_t pn_quote_data(char *dst, size_t capacity, const char *src, size_t size);
 int pn_quote(pn_string_t *dst, const char *src, size_t size);
-PN_EXTERN void pn_fprint_data(FILE *stream, const char *bytes, size_t size);
-PN_EXTERN void pn_print_data(const char *bytes, size_t size);
+void pn_fprint_data(FILE *stream, const char *bytes, size_t size);
+void pn_print_data(const char *bytes, size_t size);
 bool pn_env_bool(const char *name);
 pn_timestamp_t pn_timestamp_min(pn_timestamp_t a, pn_timestamp_t b);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message