Merge pull request #771 from luoliwoshang/chore/llcppsymg/config
llcppsymg:language config
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user