diff options
author | David Robillard <d@drobilla.net> | 2022-10-30 18:44:35 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-30 18:46:24 -0400 |
commit | b30d8f984cd2744d06044c28b6a76399e3634e00 (patch) | |
tree | d9c93c4338aa78adf8e259e79b7b96b66a2759cb /src/platform.h | |
parent | decde99974f4d879329837d2f8ceb6a556895127 (diff) | |
download | pugl-b30d8f984cd2744d06044c28b6a76399e3634e00.tar.gz pugl-b30d8f984cd2744d06044c28b6a76399e3634e00.tar.bz2 pugl-b30d8f984cd2744d06044c28b6a76399e3634e00.zip |
Add malloc attributes to allocating functions
These inform the compiler that the returned value doesn't alias with anything.
Also somewhat handy as pseudo-documentation.
Diffstat (limited to 'src/platform.h')
-rw-r--r-- | src/platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platform.h b/src/platform.h index ec16197..cfdb1b7 100644 --- a/src/platform.h +++ b/src/platform.h @@ -13,6 +13,7 @@ PUGL_BEGIN_DECLS /// Allocate and initialise world internals (implemented once per platform) +PUGL_MALLOC_FUNC PuglWorldInternals* puglInitWorldInternals(PuglWorldType type, PuglWorldFlags flags); @@ -21,6 +22,7 @@ void puglFreeWorldInternals(PuglWorld* world); /// Allocate and initialise view internals (implemented once per platform) +PUGL_MALLOC_FUNC PuglInternals* puglInitViewInternals(PuglWorld* world); |