diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-31 20:18:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-31 20:18:12 -0700 |
commit | 59beb217e76f3518ad35ea1d51b36452cf5723fd (patch) | |
tree | 3c3131edd6e6a0d3e363bd69f2564df90ccfcb1f /mpi/mpi.h | |
parent | fdb8f90b22f8d4993b5937d55f5cbffc45ae940c (diff) | |
download | txr-59beb217e76f3518ad35ea1d51b36452cf5723fd.tar.gz txr-59beb217e76f3518ad35ea1d51b36452cf5723fd.tar.bz2 txr-59beb217e76f3518ad35ea1d51b36452cf5723fd.zip |
json: fix circular printing.
The recursive JSON printer must check for the circularity
circularity-related conditions and emit #n= and #n# notations.
* lib.c (circle_print_eligible): Function moved before
out_json_rec to avoid a forward declaration.
(check_emit_circle): New static function. This is a block of
code for doing the circular logic, taken out of
obj_print_impl, because we would like to use it in
out_json_rec.
(out_json_rec): Call check_emit_circle to emit any #n= or #n#
notation. The function returns 1 if it has emitted #n#,
in which a se we are done.
(obj_print_impl): Replace moved block of code with call to
check_emit_circle.
Diffstat (limited to 'mpi/mpi.h')
0 files changed, 0 insertions, 0 deletions