diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 08:07:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 08:07:02 -0700 |
commit | c6cc120ad042fa234da17cf929c6fdfae1000a5b (patch) | |
tree | 1b4537d65bfece34b3176242a364f7c6df77e0da /arith.h | |
parent | 618a854df42cb43e410ba488a6634dae16a3e36f (diff) | |
download | txr-c6cc120ad042fa234da17cf929c6fdfae1000a5b.tar.gz txr-c6cc120ad042fa234da17cf929c6fdfae1000a5b.tar.bz2 txr-c6cc120ad042fa234da17cf929c6fdfae1000a5b.zip |
struct: rework stype_handle change.
The change which allows stype_handle to recognize struct
instances, and obtain their type, has some possibly unwanted
ramifications, since the function is widely used.
Let's refactor things so that, for now, only the
struct_type_name function takes advantage of this flexibility.
* struct.c (stype_handle_impl): New static function, copy of
stype_handle, but taking an obj_ok Boolean argument to
indicate whether an object instance is an acceptable argument,
whose type should be fetched.
(stype_handle): Now a wrapper around stype_handle_impl passing
nil for the obj_ok argument.
(stype_handle_obj): New static function. Passes t for the
ok_obj argument of stype_handle_impl.
(struct_type_name): Call stype_handle_obj instead of
stype_handle.
(super): Take advantage of stype_handle_obj to reduce code.
* txr.1: Update documentation of struct-type-name, and improve
that of super.
Diffstat (limited to 'arith.h')
0 files changed, 0 insertions, 0 deletions