qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [06/38] qpid-proton git commit: PROTON-1401: Change pn_handle_t type for more correct constness [ABI change]
Date Thu, 23 Feb 2017 22:51:13 GMT
PROTON-1401: Change pn_handle_t type for more correct constness [ABI change]


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

Branch: refs/heads/go1
Commit: 431696d22df9923543406af6f082afcef9cdd923
Parents: a96bccb
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Tue Feb 7 12:29:25 2017 -0500
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Thu Feb 9 21:31:41 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/internal/data.hpp | 6 +++---
 proton-c/bindings/cpp/src/data.cpp                     | 4 ++--
 proton-c/include/proton/object.h                       | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/431696d2/proton-c/bindings/cpp/include/proton/internal/data.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/internal/data.hpp b/proton-c/bindings/cpp/include/proton/internal/data.hpp
index bfc0e33..0e35486 100644
--- a/proton-c/bindings/cpp/include/proton/internal/data.hpp
+++ b/proton-c/bindings/cpp/include/proton/internal/data.hpp
@@ -65,8 +65,8 @@ class data : public object<pn_data_t> {
     PN_CPP_EXTERN int appendn(data src, int limit);
 
     PN_CPP_EXTERN bool next();
-    PN_CPP_EXTERN void* point() const;
-    PN_CPP_EXTERN void restore(void* h);
+    PN_CPP_EXTERN const void* point() const;
+    PN_CPP_EXTERN void restore(const void* h);
 
   protected:
     void narrow();
@@ -85,7 +85,7 @@ class data : public object<pn_data_t> {
 struct state_guard {
     /// @cond INTERNAL
     data& data_;
-    void* point_;
+    const void* point_;
     bool cancel_;
     /// @endcond
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/431696d2/proton-c/bindings/cpp/src/data.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/data.cpp b/proton-c/bindings/cpp/src/data.cpp
index 0f6e7f5..a8ebbec 100644
--- a/proton-c/bindings/cpp/src/data.cpp
+++ b/proton-c/bindings/cpp/src/data.cpp
@@ -46,9 +46,9 @@ void data::rewind() { ::pn_data_rewind(pn_object()); }
 
 bool data::empty() const { return ::pn_data_size(pn_object()) == 0; }
 
-void* data::point() const { return pn_data_point(pn_object()); }
+const void* data::point() const { return pn_data_point(pn_object()); }
 
-void data::restore(void* h) { pn_data_restore(pn_object(), pn_handle_t(h)); }
+void data::restore(const void* h) { pn_data_restore(pn_object(), pn_handle_t(h)); }
 
 void data::narrow() { pn_data_narrow(pn_object()); }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/431696d2/proton-c/include/proton/object.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/object.h b/proton-c/include/proton/object.h
index e7efd94..bbd7de0 100644
--- a/proton-c/include/proton/object.h
+++ b/proton-c/include/proton/object.h
@@ -37,7 +37,7 @@ extern "C" {
  * @cond INTERNAL
  */
 
-typedef void* pn_handle_t;
+typedef const void* pn_handle_t;
 typedef intptr_t pn_shandle_t;
 
 typedef struct pn_class_t pn_class_t;


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


Mime
View raw message