mirror of
https://github.com/nlohmann/json.git
synced 2026-10-17 19:48:12 +00:00
Restructure inline namespace and allow version component to be disabled (#3683)
This commit is contained in:
1 parent
93112fbf4d
commit
0e61ee8b07
21 files changed
+500
-99
No files matched your search
@@ -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