diff --git a/chore/_xtool/llcppsymg/config/config.go b/chore/_xtool/llcppsymg/config/config.go index 3545e25b..3f268a07 100644 --- a/chore/_xtool/llcppsymg/config/config.go +++ b/chore/_xtool/llcppsymg/config/config.go @@ -26,6 +26,7 @@ func GetConf(data []byte) (Conf, error) { Libs: GetStringItem(parsedConf, "libs", ""), Include: GetStringArrayItem(parsedConf, "include"), TrimPrefixes: GetStringArrayItem(parsedConf, "trimPrefixes"), + Cplusplus: GetBoolItem(parsedConf, "cplusplus"), } return Conf{ @@ -58,3 +59,14 @@ func GetStringArrayItem(obj *cjson.JSON, key string) (value []string) { } return } + +func GetBoolItem(obj *cjson.JSON, key string) bool { + item := obj.GetObjectItemCaseSensitive(c.AllocaCStr(key)) + if item == nil { + return false + } + if item.IsBool() != 0 { + return item.IsTrue() != 0 + } + return false +}