wip ref fixes
This commit is contained in:
parent
ae60eef4e8
commit
d79ef0831e
|
@ -37,10 +37,16 @@ template enumInstanceSerializedFields*(obj: auto,
|
||||||
## value being deserialized.
|
## value being deserialized.
|
||||||
##
|
##
|
||||||
type ObjType = type(obj)
|
type ObjType = type(obj)
|
||||||
|
type XX = type(default ObjType)
|
||||||
|
|
||||||
for fieldNameVar, fieldVar in fieldPairs(obj):
|
when obj is ref:
|
||||||
when not hasCustomPragmaFixed(ObjType, fieldNameVar, dontSerialize):
|
for fieldNameVar, fieldVar in fieldPairs(obj[]):
|
||||||
body
|
when not hasCustomPragmaFixed(ObjType, ObjType, fieldNameVar, dontSerialize):
|
||||||
|
body
|
||||||
|
else:
|
||||||
|
for fieldNameVar, fieldVar in fieldPairs(obj):
|
||||||
|
when not hasCustomPragmaFixed(ObjType, ObjType, fieldNameVar, dontSerialize):
|
||||||
|
body
|
||||||
|
|
||||||
macro enumAllSerializedFieldsImpl(T: type, body: untyped): untyped =
|
macro enumAllSerializedFieldsImpl(T: type, body: untyped): untyped =
|
||||||
## Expands a block over all fields of a type
|
## Expands a block over all fields of a type
|
||||||
|
|
Loading…
Reference in New Issue