From 8fc23a3bb9f49e88478a2505fa7dee434ec50c16 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期四, 18 一月 2024 14:31:38 +0800
Subject: [PATCH] less memory
---
api/bhsgo/bhome_node.go | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/api/bhsgo/bhome_node.go b/api/bhsgo/bhome_node.go
index 4a729a4..575ecc5 100644
--- a/api/bhsgo/bhome_node.go
+++ b/api/bhsgo/bhome_node.go
@@ -8,7 +8,6 @@
import "C"
import (
- "fmt"
"unsafe"
bh "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
@@ -18,9 +17,7 @@
if *p == nil || s == 0 {
return nil
}
- fmt.Println("unsafeGetBytes creply", *p, "len", s)
- d := (*[0x7fffffff]byte)(*p)[:s:s]
- return d
+ return (*[0x7fffffff]byte)(*p)[:s:s]
}
func ByteSlice2String(bs []byte) string {
@@ -78,9 +75,7 @@
defer C.BHFree(creply, creply_len)
if r {
// reply.Unmarshal(C.GoBytes(creply, creply_len))
- fmt.Println("creply", creply, "len", creply_len)
d := unsafeGetBytes(&creply, int(creply_len))
- fmt.Println("data len", len(d))
reply.Unmarshal(d)
}
return r
--
Gitblit v1.8.0