Repository: qpid-proton
Updated Branches:
  refs/heads/master 2bcfd36f7 -> a34c93bfb


PROTON-1356: go: restore compatibility from proton 0.10

Remove use of PN_INVALID (not available in proton 0.10)
Link with libqpid-proton not libqpid-proton-core (not available until 0.16)


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

Branch: refs/heads/master
Commit: a34c93bfbeafb242dee4ecd31ef698aa1e3b2e7b
Parents: 2bcfd36
Author: Alan Conway <[email protected]>
Authored: Fri Nov 25 15:51:52 2016 -0500
Committer: Alan Conway <[email protected]>
Committed: Fri Nov 25 15:51:52 2016 -0500

----------------------------------------------------------------------
 proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go      |  2 +-
 proton-c/bindings/go/src/qpid.apache.org/amqp/types.go    |  4 +---
 .../bindings/go/src/qpid.apache.org/amqp/unmarshal.go     | 10 +++-------
 proton-c/bindings/go/src/qpid.apache.org/electron/doc.go  |  2 +-
 proton-c/bindings/go/src/qpid.apache.org/proton/doc.go    |  2 +-
 proton-c/bindings/go/src/qpid.apache.org/proton/error.go  |  2 +-
 6 files changed, 8 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go 
b/proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go
index d270704..97051a5 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/doc.go
@@ -30,7 +30,7 @@ AMQP 1.0 is an open standard for inter-operable message 
exchange, see <http://ww
 */
 package amqp
 
-// #cgo LDFLAGS: -lqpid-proton-core
+// #cgo LDFLAGS: -lqpid-proton
 import "C"
 
 // This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/amqp/types.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/types.go 
b/proton-c/bindings/go/src/qpid.apache.org/amqp/types.go
index bc0859a..2852c23 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/types.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/types.go
@@ -82,10 +82,8 @@ func (t C.pn_type_t) String() string {
                return "list"
        case C.PN_MAP:
                return "map"
-       case C.PN_INVALID:
-               return "no-data"
        default:
-               return fmt.Sprintf("unknown-type(%d)", t)
+               return "no-data"
        }
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go 
b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
index 95d4343..8f380a7 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
@@ -451,8 +451,6 @@ func rewindUnmarshal(v interface{}, data *C.pn_data_t) {
 func getInterface(data *C.pn_data_t, v *interface{}) {
        pnType := C.pn_data_type(data)
        switch pnType {
-       case C.PN_NULL, C.PN_INVALID: // No data.
-               *v = nil
        case C.PN_BOOL:
                *v = bool(C.pn_data_get_bool(data))
        case C.PN_UBYTE:
@@ -491,8 +489,8 @@ func getInterface(data *C.pn_data_t, v *interface{}) {
                l := make(List, 0)
                unmarshal(&l, data)
                *v = l
-       default:
-               panic(newUnmarshalError(pnType, v))
+       default: // No data (-1 or NULL)
+               *v = nil
        }
 }
 
@@ -517,9 +515,7 @@ func getMap(data *C.pn_data_t, v interface{}) {
                                }
                        }
                }
-       case C.PN_INVALID: // Leave the map empty
-       default:
-               panic(newUnmarshalError(pnType, v))
+       default: // Empty/error/unknown, leave map empty
        }
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/electron/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/doc.go 
b/proton-c/bindings/go/src/qpid.apache.org/electron/doc.go
index 79a566e..bc2c589 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/doc.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/doc.go
@@ -48,7 +48,7 @@ More realistic examples: 
https://github.com/apache/qpid-proton/blob/master/examp
 */
 package electron
 
-//#cgo LDFLAGS: -lqpid-proton-core
+//#cgo LDFLAGS: -lqpid-proton
 import "C"
 
 // Just for package comment

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go 
b/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
index 27bc5ec..083f701 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/doc.go
@@ -58,7 +58,7 @@ applications.
 */
 package proton
 
-// #cgo LDFLAGS: -lqpid-proton-core
+// #cgo LDFLAGS: -lqpid-proton
 import "C"
 
 // This file is just for the package comment.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a34c93bf/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/error.go 
b/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
index 5232fec..80d9680 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
@@ -20,7 +20,7 @@ under the License.
 // Internal implementation details - ignore.
 package proton
 
-// #cgo LDFLAGS: -lqpid-proton-core
+// #cgo LDFLAGS: -lqpid-proton
 // #include <proton/error.h>
 // #include <proton/codec.h>
 import "C"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to