Gwion / Gwion

:musical_note: strongly-timed musical programming language

Home Page:https://Gwion.github.io/Gwion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ANN and similar macros

scalarwaves opened this issue · comments

Hello Jérémie,

I am still following the Gwion project and figuring out how I might use it with Rust. I noticed the ANN, ANN2, and ANEW macros are used throughout the code and I'm wondering what these do and if there's a way to translate it into Rust macros/attributes. I'm guesssing that it has to do with the Gwion compiler and memory allocation.

Can you please explain these?

sorry for the delay, just saw the issue.
ANN is to tell the compiler the arguments can't be NULL
ANN2 is to tell which arguments can't be NULL (used in case one or more arguments could be)
ANEW tells that the function allocates memory.
hope that helps

That is helpful, thank you