projects
/
muddle-interpreter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
read: implement basic decimal FIXes
[muddle-interpreter.git]
/
src
/
object.h
diff --git
a/src/object.h
b/src/object.h
index 80c886e3051108c8c47fe886eee00c00dcc5b966..b62cacbd7793db78966e9cc86da31715d05b6491 100644
(file)
--- a/
src/object.h
+++ b/
src/object.h
@@
-111,14
+111,14
@@
typedef struct
alignas (16) evaltype type;
pool_ptr rest;
uint32_t _pad;
alignas (16) evaltype type;
pool_ptr rest;
uint32_t _pad;
-
u
int32_t val;
+ int32_t val;
} fix32_object;
typedef struct
{
alignas (16) evaltype type;
pool_ptr rest;
} fix32_object;
typedef struct
{
alignas (16) evaltype type;
pool_ptr rest;
-
u
int64_t val;
+ int64_t val;
} fix64_object;
typedef struct
} fix64_object;
typedef struct
@@
-196,12
+196,20
@@
union object
Initialization helpers.
*/
Initialization helpers.
*/
+static inline fix32_object
+new_fix32 (int32_t n)
+{
+ return (fix32_object)
+ {
+ .type = EVALTYPE_FIX32,.rest = 0,.val = n};
+}
+
static inline fix64_object
static inline fix64_object
-new_fix64 (
u
int64_t n)
+new_fix64 (int64_t n)
{
return (fix64_object)
{
{
return (fix64_object)
{
- .type = EVALTYPE_FIX64,.rest = 0,.val = n
,
};
+ .type = EVALTYPE_FIX64,.rest = 0,.val = n};
}
static inline list_object
}
static inline list_object