From 2b249216eba72f0ea9700b7eede3711ff45a1327 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 7 Oct 2016 21:47:34 -0700 Subject: Check for self-assignment in replace_struct. * struct.c (replace_struct): If target and source are the same object, just do nothing and return target. * txr.1: Document self-assignment and return value of replace-struct. --- txr.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index c1fc78ce..c7fde830 100644 --- a/txr.1 +++ b/txr.1 @@ -21521,6 +21521,17 @@ prior to using .codn replace-struct , or to take other measures to handle the situation. +If the +.meta target-obj +and +.meta source-obj +arguments are the same object, +.code replace-struct +has no effect. + +The return value is +.metn target-obj . + .coNP Function @ method .synb .mets (method < struct-obj << slot-name ) -- cgit v1.2.3