Skip to content

Commit

Permalink
Update bool external representation from #true/#false to #t/#f
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Sep 30, 2023
1 parent 854b0fb commit 0de422e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Subset of R7RS-small.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.4.818_amd64.deb
sudo apt install build/meevax_0.4.821_amd64.deb
```

or
Expand Down Expand Up @@ -106,9 +106,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.4.818.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.4.821.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.4.818_amd64.deb`
| `package` | Generate debian package `meevax_0.4.821_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.818
0.4.821
20 changes: 10 additions & 10 deletions include/meevax/memory/nan_boxing_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,27 +195,27 @@ inline namespace memory
{
switch (signature())
{
#define DEFINE(TYPE) \
#define CASE(TYPE) \
case signature_##TYPE: \
if constexpr (std::is_same_v<TYPE, bool>) \
{ \
return os << std::boolalpha << yellow('#', as<TYPE>()); \
return os << yellow('#', as<TYPE>() ? 't' : 'f'); \
} \
else \
{ \
return os << yellow(as<TYPE>()); \
} \
static_assert(true)

DEFINE(T1);
DEFINE(T2);
DEFINE(T3);
DEFINE(T4);
DEFINE(T5);
DEFINE(T6);
DEFINE(pointer);
CASE(T1);
CASE(T2);
CASE(T3);
CASE(T4);
CASE(T5);
CASE(T6);
CASE(pointer);

#undef DEFINE
#undef CASE

default:
if (auto value = as<double>(); std::isnan(value))
Expand Down

0 comments on commit 0de422e

Please sign in to comment.