From b30d8f984cd2744d06044c28b6a76399e3634e00 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Oct 2022 18:44:35 -0400 Subject: 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. --- src/platform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.1