summaryrefslogtreecommitdiffstats
path: root/adapter/vppapiclient/stat_client.go
diff options
context:
space:
mode:
authorNicolas PLANEL <nplanel@redhat.com>2019-03-21 23:05:05 +0100
committerNicolas PLANEL <nplanel@redhat.com>2019-03-21 23:07:42 +0100
commit345201eedce4cefae4db6914067a34000a7f978f (patch)
tree2382d93be2085ecba0abec86b3239534fc4f8d5f /adapter/vppapiclient/stat_client.go
parent29e1639101b093c5f66331b0f1385564c88db1c7 (diff)
Fixup build with golang 1.12
_Ctype_ direct call are prohibited, use C namespace instead. Change-Id: Ifd77469e15a10ce8381b8308282d549c62f1318c Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
Diffstat (limited to 'adapter/vppapiclient/stat_client.go')
-rw-r--r--adapter/vppapiclient/stat_client.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/adapter/vppapiclient/stat_client.go b/adapter/vppapiclient/stat_client.go
index 2e2d6db..df192f6 100644
--- a/adapter/vppapiclient/stat_client.go
+++ b/adapter/vppapiclient/stat_client.go
@@ -249,8 +249,8 @@ func (c *statClient) DumpStats(patterns ...string) (stats []*adapter.StatEntry,
length := int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_simple_counter(&v))))
vector := make([][]adapter.Counter, length)
for k := 0; k < length; k++ {
- for j := 0; j < int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_simple_counter_index(&v, _Ctype_int(k))))); j++ {
- vector[k] = append(vector[k], adapter.Counter(C.govpp_stat_segment_data_get_simple_counter_index_value(&v, _Ctype_int(k), _Ctype_int(j))))
+ for j := 0; j < int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_simple_counter_index(&v, C.int(k))))); j++ {
+ vector[k] = append(vector[k], adapter.Counter(C.govpp_stat_segment_data_get_simple_counter_index_value(&v, C.int(k), C.int(j))))
}
}
stat.Data = adapter.SimpleCounterStat(vector)
@@ -259,10 +259,10 @@ func (c *statClient) DumpStats(patterns ...string) (stats []*adapter.StatEntry,
length := int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_combined_counter(&v))))
vector := make([][]adapter.CombinedCounter, length)
for k := 0; k < length; k++ {
- for j := 0; j < int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_combined_counter_index(&v, _Ctype_int(k))))); j++ {
+ for j := 0; j < int(C.govpp_stat_segment_vec_len(unsafe.Pointer(C.govpp_stat_segment_data_get_combined_counter_index(&v, C.int(k))))); j++ {
vector[k] = append(vector[k], adapter.CombinedCounter{
- Packets: adapter.Counter(C.govpp_stat_segment_data_get_combined_counter_index_packets(&v, _Ctype_int(k), _Ctype_int(j))),
- Bytes: adapter.Counter(C.govpp_stat_segment_data_get_combined_counter_index_bytes(&v, _Ctype_int(k), _Ctype_int(j))),
+ Packets: adapter.Counter(C.govpp_stat_segment_data_get_combined_counter_index_packets(&v, C.int(k), C.int(j))),
+ Bytes: adapter.Counter(C.govpp_stat_segment_data_get_combined_counter_index_bytes(&v, C.int(k), C.int(j))),
})
}
}