mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
Restructure inline namespace and allow version component to be disabled (#3683)
This commit is contained in:
committed by
GitHub
parent
93112fbf4d
commit
0e61ee8b07
@ -1,7 +1,7 @@
|
||||
import gdb
|
||||
import re
|
||||
|
||||
ns_pattern = re.compile(r'nlohmann::json_v(?P<v_major>\d+)_(?P<v_minor>\d+)_(?P<v_patch>\d+)(?P<tags>\w*)::(?P<name>.+)')
|
||||
ns_pattern = re.compile(r'nlohmann(::json_abi(?P<tags>\w*)(_v(?P<v_major>\d+)_(?P<v_minor>\d+)_(?P<v_patch>\d+))?)?::(?P<name>.+)')
|
||||
class JsonValuePrinter:
|
||||
"Print a json-value"
|
||||
|
||||
@ -26,7 +26,7 @@ def json_lookup_function(val):
|
||||
return gdb.default_visualizer(union_val.dereference())
|
||||
else:
|
||||
return JsonValuePrinter(union_val)
|
||||
except:
|
||||
except Exception:
|
||||
return JsonValuePrinter(val['m_type'])
|
||||
|
||||
gdb.pretty_printers.append(json_lookup_function)
|
||||
|
Reference in New Issue
Block a user