Skip to content

Commit 4aa87de

Browse files
committed
fix var lengths with v0.27
1 parent e5816f3 commit 4aa87de

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

go/genwrap.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ package amqp
9494
9595
// #include <proton/version.h>
9696
// #if PN_VERSION_MAJOR == %s && PN_VERSION_MINOR < %s
97-
// #error packages qpid.apache.org/... require Proton-C library version 0.10 or greater
97+
// #error packages qpid.apache.org/... require Proton-C library version %s.%s or greater
9898
// #endif
9999
import "C"
100-
`, splitVersion[0], splitVersion[1])
100+
`, splitVersion[0], splitVersion[1], splitVersion[0], splitVersion[1])
101101
}
102102

103103
func genWrappers() {
@@ -352,15 +352,15 @@ func mapType(ctype string) (g genType) {
352352
case "C.int64_t":
353353
g.Gotype = "int64"
354354
case "C.int32_t":
355-
g.Gotype = "int16"
356-
case "C.int16_t":
357355
g.Gotype = "int32"
356+
case "C.int16_t":
357+
g.Gotype = "int16"
358358
case "C.uint64_t":
359359
g.Gotype = "uint64"
360360
case "C.uint32_t":
361-
g.Gotype = "uint16"
362-
case "C.uint16_t":
363361
g.Gotype = "uint32"
362+
case "C.uint16_t":
363+
g.Gotype = "uint16"
364364
case "C.const char *":
365365
fallthrough
366366
case "C.char *":

go/src/qpid.apache.org/amqp/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ package amqp
3030

3131
// #include <proton/version.h>
3232
// #if PN_VERSION_MAJOR == 0 && PN_VERSION_MINOR < 27
33-
// #error packages qpid.apache.org/... require Proton-C library version 0.10 or greater
33+
// #error packages qpid.apache.org/... require Proton-C library version 0.27 or greater
3434
// #endif
3535
import "C"

go/src/qpid.apache.org/proton/wrappers_gen.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,10 @@ func (d Disposition) Condition() Condition {
467467
func (d Disposition) Data() Data {
468468
return Data{C.pn_disposition_data(d.pn)}
469469
}
470-
func (d Disposition) SectionNumber() uint16 {
471-
return uint16(C.pn_disposition_get_section_number(d.pn))
470+
func (d Disposition) SectionNumber() uint32 {
471+
return uint32(C.pn_disposition_get_section_number(d.pn))
472472
}
473-
func (d Disposition) SetSectionNumber(section_number uint16) {
473+
func (d Disposition) SetSectionNumber(section_number uint32) {
474474
C.pn_disposition_set_section_number(d.pn, C.uint32_t(section_number))
475475
}
476476
func (d Disposition) SectionOffset() uint64 {
@@ -828,23 +828,23 @@ func (t Transport) Log(message string) {
828828

829829
C.pn_transport_log(t.pn, messageC)
830830
}
831-
func (t Transport) ChannelMax() uint32 {
832-
return uint32(C.pn_transport_get_channel_max(t.pn))
831+
func (t Transport) ChannelMax() uint16 {
832+
return uint16(C.pn_transport_get_channel_max(t.pn))
833833
}
834-
func (t Transport) SetChannelMax(channel_max uint32) int {
834+
func (t Transport) SetChannelMax(channel_max uint16) int {
835835
return int(C.pn_transport_set_channel_max(t.pn, C.uint16_t(channel_max)))
836836
}
837-
func (t Transport) RemoteChannelMax() uint32 {
838-
return uint32(C.pn_transport_remote_channel_max(t.pn))
837+
func (t Transport) RemoteChannelMax() uint16 {
838+
return uint16(C.pn_transport_remote_channel_max(t.pn))
839839
}
840-
func (t Transport) MaxFrame() uint16 {
841-
return uint16(C.pn_transport_get_max_frame(t.pn))
840+
func (t Transport) MaxFrame() uint32 {
841+
return uint32(C.pn_transport_get_max_frame(t.pn))
842842
}
843-
func (t Transport) SetMaxFrame(size uint16) {
843+
func (t Transport) SetMaxFrame(size uint32) {
844844
C.pn_transport_set_max_frame(t.pn, C.uint32_t(size))
845845
}
846-
func (t Transport) RemoteMaxFrame() uint16 {
847-
return uint16(C.pn_transport_get_remote_max_frame(t.pn))
846+
func (t Transport) RemoteMaxFrame() uint32 {
847+
return uint32(C.pn_transport_get_remote_max_frame(t.pn))
848848
}
849849
func (t Transport) IdleTimeout() time.Duration {
850850
return (time.Duration(C.pn_transport_get_idle_timeout(t.pn)) * time.Millisecond)

0 commit comments

Comments
 (0)