mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-26 13:51:50 +03:00
380945bf32
* feat: add box templates and box type
This commit adds an implementation of Boxes, memory manged heap
allocated values.
Boxes are implemented as C pointers, with no additional structure but
are treated as structs in Carp. To facilitate this, we need to add them
as a clause to our special type emissions (TypesToC) as they'd otherwise
be emitted like other struct types.
Co-authored-by: Veit Heller <veit@veitheller.de>
* fix: slight memory management fix for Box
Make sure we free the box!
* test: add tests for box (including memory checks)
* Revert "fix: Ignore clang nitpick"
This reverts commit
|
||
---|---|---|
.. | ||
headers | ||
benchmark_mandelbrot.carp | ||
benchmark_n-body.carp | ||
bugs.carp | ||
carp_demo.carp | ||
derive.carp | ||
drop.carp | ||
external_struct.carp | ||
fonts.carp | ||
functor.carp | ||
game_of_life.carp | ||
generic_structs.carp | ||
glfw.carp | ||
guessing_game.carp | ||
langtons_ant.carp | ||
maps.carp | ||
minimal_sdl.carp | ||
mutual_recursion.carp | ||
nested_lambdas.carp | ||
no_core.carp | ||
quasiquote.carp | ||
reptile.carp | ||
sorting.carp | ||
sounds.carp | ||
static_array.carp | ||
sumtypes.carp | ||
unicode.carp | ||
updating.carp | ||
vector.carp |