diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 14:02:19 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 14:02:19 -0500 |
| commit | 955f047e069497be4cbeffa3e0309360aeb1efa7 (patch) | |
| tree | 20b59546bb79c75d368739959d15c28317e913bd /builtins/types.h | |
| parent | 0921f3723bf7fe7539aa7a5dfdbd921f445777af (diff) | |
First pass at lambdas/closures
Diffstat (limited to 'builtins/types.h')
| -rw-r--r-- | builtins/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtins/types.h b/builtins/types.h index 397e14c1..533ffb86 100644 --- a/builtins/types.h +++ b/builtins/types.h @@ -52,6 +52,8 @@ typedef struct TypeInfo { .tag=TableInfo, .TableInfo.key=key_expr, .TableInfo.value=value_expr}) #define $FunctionInfo(typestr) &((TypeInfo){.size=sizeof(void*), .align=__alignof__(void*), \ .tag=FunctionInfo, .FunctionInfo.type_str=typestr}) +#define $ClosureInfo(typestr) &((TypeInfo){.size=2*sizeof(void*), .align=__alignof__(void*), \ + .tag=FunctionInfo, .FunctionInfo.type_str=typestr}) #define $TypeInfoInfo(typestr) &((TypeInfo){.size=sizeof(TypeInfo), .align=__alignof__(TypeInfo), \ .tag=TypeInfoInfo, .TypeInfoInfo.type_str=typestr}) |
