tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.03k stars 48 forks source link

Retval initialisation #100

Closed tomhrr closed 8 years ago

tomhrr commented 8 years ago

Currently, retvals are provided when a variable is defined or changed. The retval points directly to the variable. This means that, on definition, the retval will have uninitialised memory, and on change, the current state of the variable can be retrieved via the retval. What should be happening instead is that retvals should always point to a freshly-initialised variable of the relevant type, and then an appropriate setf operation should be called to move/copy that variable into the 'target' variable.