summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-20 04:36:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-20 04:36:05 -0700
commitd467598989bcd815adf30e42f9a67a73929f9d71 (patch)
tree2c4f39c4ab225bda9c409e2db90a319aedccc3bc /lib.h
parent1b78b60d156e3c8593efdc04133131bfcaffaeab (diff)
downloadtxr-d467598989bcd815adf30e42f9a67a73929f9d71.tar.gz
txr-d467598989bcd815adf30e42f9a67a73929f9d71.tar.bz2
txr-d467598989bcd815adf30e42f9a67a73929f9d71.zip
Revert bogus LIT_ALIGN commit from 2015.
This reverts commit 0343c6f32c5bd8335e88595cb9d23506625b2586. I don't see evidence that the claim in the commit is true: that wide literals are not four-byte-aligned on Darwin in spite of sizeof(wchar_t) being 4. Not even with the old clang in my old VM where I first thought I discovered this. * configure: do not set up LIT_ALIGN == 2 for Darwin. * lib.h (litptr): Remove LIT_ALIGN < 4 && SIZEOF_WCHAR_T == 4 case. * HACKING: Undocument bogus claim.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib.h b/lib.h
index bd05f1e2..0eaa77d7 100644
--- a/lib.h
+++ b/lib.h
@@ -452,12 +452,9 @@ INLINE val static_str(const wchli_t *str)
INLINE wchar_t *litptr(val obj)
{
-#if LIT_ALIGN < 4 && SIZEOF_WCHAR_T < 4
+#if LIT_ALIGN < 4
wchar_t *ret = coerce(wchar_t *, (coerce(cnum, obj) & ~TAG_MASK));
return (*ret == 0) ? ret + 1 : ret;
-#elif LIT_ALIGN < 4 && SIZEOF_WCHAR_T == 4
- short *ret = coerce(short *, (coerce(cnum, obj) & ~TAG_MASK));
- return coerce(wchar_t *, (*ret == 0) ? ret + 1 : ret);
#else
return coerce(wchar_t *, coerce(cnum, obj) & ~TAG_MASK);
#endif