Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 31b65ca

Browse files
type safety on twist() and untwist()
1 parent 5f3a1b9 commit 31b65ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎ulisp.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ enum stream { SERIALSTREAM, I2CSTREAM, SPISTREAM, SDSTREAM
144144

145145
typedef uint32_t symbol_t;
146146
typedef uint8_t minmax_t;
147-
typedef uint16_t builtin_t;
147+
typedef uint32_t builtin_t;
148148
typedef uint16_t flags_t;
149149

150150
typedef struct sobject {
@@ -268,11 +268,11 @@ void plispstr (symbol_t, pfun_t);
268268
void testescape ();
269269
bool is_macro_call (object*, object*);
270270

271-
inline uint32_t twist (uint32_t x) {
271+
inline symbol_t twist (builtin_t x) {
272272
return (x<<2) | ((x & 0xC0000000)>>30);
273273
}
274274

275-
inline uint32_t untwist (uint32_t x) {
275+
inline builtin_t untwist (symbol_t x) {
276276
return (x>>2 & 0x3FFFFFFF) | ((x & 0x03)<<30);
277277
}
278278

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /