qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jr...@apache.org
Subject [1/2] qpid-proton git commit: PROTON-1920: Enable deprecation warnings for URL
Date Tue, 28 Aug 2018 14:50:40 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master c037704a7 -> 31fdab2d9


PROTON-1920: Enable deprecation warnings for URL


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

Branch: refs/heads/master
Commit: a485dc485b5627304c02cf60ce6130cc685a6244
Parents: c037704
Author: Justin Ross <jross@apache.org>
Authored: Tue Aug 28 07:26:41 2018 -0700
Committer: Justin Ross <jross@apache.org>
Committed: Tue Aug 28 07:26:41 2018 -0700

----------------------------------------------------------------------
 c/include/proton/url.h     | 20 +++++++++++++++++++-
 c/src/extra/url.c          |  4 +++-
 c/src/reactor/connection.c |  4 ++++
 c/tests/fuzz/fuzz-url.c    |  4 ++++
 c/tests/parse-url.c        |  4 ++++
 c/tools/reactor-recv.c     |  4 ++++
 c/tools/reactor-send.c     |  4 ++++
 ruby/cproton.i             |  2 ++
 8 files changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/include/proton/url.h
----------------------------------------------------------------------
diff --git a/c/include/proton/url.h b/c/include/proton/url.h
index ad239ce..65f4048 100644
--- a/c/include/proton/url.h
+++ b/c/include/proton/url.h
@@ -43,6 +43,7 @@ typedef struct pn_url_t pn_url_t;
 /**
  * Create an empty URL
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN pn_url_t *pn_url(void);
 
 /**
@@ -63,15 +64,19 @@ PNX_EXTERN pn_url_t *pn_url(void);
  * @param[in] url A URL string.
  * @return The parsed pn_url_t or NULL if url is not a valid URL string.
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN pn_url_t *pn_url_parse(const char *url);
 
 /**
- * Free a URL */
+ * Free a URL
+ */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_free(pn_url_t *url);
 
 /**
  * Clear the contents of the URL.
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_clear(pn_url_t *url);
 
 /**
@@ -80,6 +85,7 @@ PNX_EXTERN void pn_url_clear(pn_url_t *url);
  * The returned string is owned by the pn_url_t and will become
  * invalid if it is modified.
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_str(pn_url_t *url);
 
 /**
@@ -89,11 +95,17 @@ PNX_EXTERN const char *pn_url_str(pn_url_t *url);
  *
  * @{
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_scheme(pn_url_t *url);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_username(pn_url_t *url);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_password(pn_url_t *url);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_host(pn_url_t *url);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_port(pn_url_t *url);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN const char *pn_url_get_path(pn_url_t *url);
 /**
  * @}
@@ -107,11 +119,17 @@ PNX_EXTERN const char *pn_url_get_path(pn_url_t *url);
  *
  * @{
  */
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_scheme(pn_url_t *url, const char *scheme);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_username(pn_url_t *url, const char *username);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_password(pn_url_t *url, const char *password);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_host(pn_url_t *url, const char *host);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_port(pn_url_t *url, const char *port);
+PN_DEPRECATED("use a third-party URL library")
 PNX_EXTERN void pn_url_set_path(pn_url_t *url, const char *path);
 /**
  * @}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/src/extra/url.c
----------------------------------------------------------------------
diff --git a/c/src/extra/url.c b/c/src/extra/url.c
index c4aa48c..9652f82 100644
--- a/c/src/extra/url.c
+++ b/c/src/extra/url.c
@@ -19,6 +19,8 @@
  *
  */
 
+#define PN_USE_DEPRECATED_API 1
+
 #include "core/util.h"
 #include "proton/url.h"
 #include "proton/object.h"
@@ -267,4 +269,4 @@ 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); }
 
-
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/src/reactor/connection.c
----------------------------------------------------------------------
diff --git a/c/src/reactor/connection.c b/c/src/reactor/connection.c
index 090947c..15ec01b 100644
--- a/c/src/reactor/connection.c
+++ b/c/src/reactor/connection.c
@@ -19,6 +19,8 @@
  *
  */
 
+#define PN_USE_DEPRECATED_API 1
+
 #include <proton/connection.h>
 #include <proton/object.h>
 #include <proton/sasl.h>
@@ -368,3 +370,5 @@ const char *pn_reactor_get_connection_address(pn_reactor_t *reactor,
     }
     return NULL;
 }
+
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/tests/fuzz/fuzz-url.c
----------------------------------------------------------------------
diff --git a/c/tests/fuzz/fuzz-url.c b/c/tests/fuzz/fuzz-url.c
index 71dafd5..7f6935b 100644
--- a/c/tests/fuzz/fuzz-url.c
+++ b/c/tests/fuzz/fuzz-url.c
@@ -19,6 +19,8 @@
  *
  */
 
+#define PN_USE_DEPRECATED_API
+
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
@@ -41,3 +43,5 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   free(str);
   return 0;
 }
+
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/tests/parse-url.c
----------------------------------------------------------------------
diff --git a/c/tests/parse-url.c b/c/tests/parse-url.c
index b632237..ea5abc3 100644
--- a/c/tests/parse-url.c
+++ b/c/tests/parse-url.c
@@ -19,6 +19,8 @@
  *
  */
 
+#define PN_USE_DEPRECATED_API 1
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -121,3 +123,5 @@ int main(int argc, char **argv)
   TEST(testrt("://:@://:", "", "", "", 0, "", "/:"));
   return failed;
 }
+
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/tools/reactor-recv.c
----------------------------------------------------------------------
diff --git a/c/tools/reactor-recv.c b/c/tools/reactor-recv.c
index 2a3d434..e26d892 100644
--- a/c/tools/reactor-recv.c
+++ b/c/tools/reactor-recv.c
@@ -22,6 +22,8 @@
  * Implements a subset of msgr-recv.c using reactor events.
  */
 
+#define PN_USE_DEPRECATED_API 1
+
 #include "proton/message.h"
 #include "proton/error.h"
 #include "proton/types.h"
@@ -449,3 +451,5 @@ int main(int argc, char** argv)
   addresses_free( &opts.subscriptions );
   return 0;
 }
+
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/c/tools/reactor-send.c
----------------------------------------------------------------------
diff --git a/c/tools/reactor-send.c b/c/tools/reactor-send.c
index f8d0c50..f182193 100644
--- a/c/tools/reactor-send.c
+++ b/c/tools/reactor-send.c
@@ -18,6 +18,8 @@
  *
  */
 
+#define PN_USE_DEPRECATED_API 1
+
 /*
  * Implements a subset of msgr-send.c using reactor events.
  */
@@ -414,3 +416,5 @@ int main(int argc, char** argv)
   addresses_free(&opts.targets);
   return 0;
 }
+
+#undef PN_USE_DEPRECATED_API

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a485dc48/ruby/cproton.i
----------------------------------------------------------------------
diff --git a/ruby/cproton.i b/ruby/cproton.i
index 317641a..f8a0f3d 100644
--- a/ruby/cproton.i
+++ b/ruby/cproton.i
@@ -19,6 +19,8 @@
 %module cproton
 
 %{
+#define PN_USE_DEPRECATED_API 1
+
 #include <proton/connection_driver.h>
 #include <proton/engine.h>
 #include <proton/handlers.h>


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


Mime
View raw message