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 | 944a258b1dbf1465b91690cf5784eef9336a2471 (patch) | |
tree | fc92c80f9c9f5a39342b219e430f4d3f4bee80c0 | |
parent | ca34937d301d52c18a7a21a1081ac0c2eb7d8ce6 (diff) | |
download | txr-944a258b1dbf1465b91690cf5784eef9336a2471.tar.gz txr-944a258b1dbf1465b91690cf5784eef9336a2471.tar.bz2 txr-944a258b1dbf1465b91690cf5784eef9336a2471.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.
-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); |