fluffos/docs/efun/contrib/replace_objects.md

26 lines
661 B
Markdown
Raw Permalink Normal View History

docs/efun: document FFI + dwlib efuns, fix return-type errors, drop stale docs Reviewed every efun doc against the .spec source of truth (the make_func declarations) and the implementations. New docs for 28 previously-undocumented efuns: - package_ffi (18): new docs/efun/ffi/ category — ffi_load/unload/symbol/ prepare/call, alloc/free/sizeof/peek/address/read/write, struct_layout, callback/callback_addr/callback_free, error/status. - package_dwlib (10, under contrib/): add_a, vowel, replace, replace_dollars/html/mxp/objects, roulette_wheel, query_multiple_short, reference_allowed. Return-type fixes where the doc contradicted the spec/impl (mostly stale MudOS behavior): cache_stats/debugmalloc/dump_file_descriptors/ malloc_status/mud_status return string; disable_commands/flush_messages/ receive/set_heart_beat are void; get_char/input_to/link/set_eval_limit return int; call_stack -> mixed *, function_profile -> mapping *. Also corrected receive's and disable_commands' stale "returns ..." prose. Expanded implode (function-fold form) and save_object (save-to-string form), both of which the docs had omitted. Removed 4 stale docs for efuns that no longer exist (no spec entry, no f_ implementation, zero references anywhere): errorp, opcprof, swap, dump_socket_status. Regenerated the affected efun index pages. The Docusaurus build passes with onBrokenLinks:throw, confirming no dangling links. Note: the docs/zh-CN translated tree still mirrors the old English docs (same stale entries, and it lacks the new efuns); left for a separate translation pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 16:03:27 -07:00
---
title: contrib / replace_objects
---
# replace_objects
### NAME
replace_objects() - recursively render objects in a value as strings
### SYNOPSIS
mixed replace_objects( mixed value );
### DESCRIPTION
Walks `value` (an object, array, class, or mapping, to any depth) and
returns a copy in which every object is replaced by a descriptive
string — its object name plus, via the master apply object_name(),
a readable label, or "(destructed)" for a destructed object. Arrays,
classes and mappings keep their structure; other values pass through
unchanged. Chiefly a debugging / dump helper.
### SEE ALSO
sprintf(3)