diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-22 06:56:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-22 06:56:11 -0700 |
commit | 423d823c227f8c8ffb41ef32c6909e77e1ccd8f3 (patch) | |
tree | fc92c80f9c9f5a39342b219e430f4d3f4bee80c0 /lib.c | |
parent | 65531dd765edadeb2fb2a83cf82df4af73100b95 (diff) | |
download | txr-423d823c227f8c8ffb41ef32c6909e77e1ccd8f3.tar.gz txr-423d823c227f8c8ffb41ef32c6909e77e1ccd8f3.tar.bz2 txr-423d823c227f8c8ffb41ef32c6909e77e1ccd8f3.zip |
printer: add package prefix on symbols with zero-length name.
* lib.c (symbol_needs_prefix): If the name is an empty string,
the symbol needs a prefix. Otherwise it disappears in the
output.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5497,6 +5497,9 @@ val symbol_needs_prefix(val self, val package, val sym) if (sym_pkg == keyword_package) return null_string; + if (length_str(name) == zero) + return sym_pkg->pk.name; + if (sym_pkg == package) { if (us_hash_count(package->pk.hidhash) != zero) { val here_cell = gethash_e(self, package->pk.symhash, name); |