From e0a6bff286b26bab5e6aaf43a8799d18bc456670 Mon Sep 17 00:00:00 2001 From: Larpon Date: Thu, 11 Jan 2024 16:29:47 +0100 Subject: [PATCH] all: add `@[noinit]` to structs with `create_STRUCT()` functions available (#714) --- mouse.c.v | 2 +- mutex.c.v | 6 +++--- render.c.v | 6 +++--- surface.c.v | 2 +- thread.c.v | 2 +- video.c.v | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mouse.c.v b/mouse.c.v index af7ed716..f6e96c74 100644 --- a/mouse.c.v +++ b/mouse.c.v @@ -6,7 +6,7 @@ module sdl // // SDL_mouse.h // -@[typedef] +@[noinit; typedef] pub struct C.SDL_Cursor { } diff --git a/mutex.c.v b/mutex.c.v index ee3d21e5..13ca46bb 100644 --- a/mutex.c.v +++ b/mutex.c.v @@ -16,7 +16,7 @@ pub const mutex_maxwait = C.SDL_MUTEX_MAXWAIT // (~(Uint32)0) // Mutex is the SDL mutex structure, defined in SDL_sysmutex.c // Mutex is C.SDL_mutex -@[typedef] +@[noinit; typedef] pub struct C.SDL_mutex { } @@ -135,7 +135,7 @@ pub fn destroy_mutex(mutex &Mutex) { // Sem is the SDL semaphore structure, defined in SDL_syssem.c // Sem is C.SDL_sem -@[typedef] +@[noinit; typedef] pub struct C.SDL_sem { } @@ -306,7 +306,7 @@ pub fn sem_value(sem &Sem) u32 { // Cond is the SDL condition variable structure, defined in SDL_syscond.c // Cond is C.SDL_cond -@[typedef] +@[noinit; typedef] pub struct C.SDL_cond { } diff --git a/render.c.v b/render.c.v index fe4a3890..da02ac54 100644 --- a/render.c.v +++ b/render.c.v @@ -34,7 +34,7 @@ pub enum RendererFlags { targettexture = C.SDL_RENDERER_TARGETTEXTURE // 0x00000008 } -@[typedef] +@[noinit; typedef] pub struct C.SDL_RendererInfo { pub: name &char // The name of the renderer @@ -87,13 +87,13 @@ pub enum RendererFlip { vertical = C.SDL_FLIP_VERTICAL // 0x00000002 flip vertically } -@[typedef] +@[noinit; typedef] pub struct C.SDL_Renderer { } pub type Renderer = C.SDL_Renderer -@[typedef] +@[noinit; typedef] pub struct C.SDL_Texture { } diff --git a/surface.c.v b/surface.c.v index bcf126b6..27aaf323 100644 --- a/surface.c.v +++ b/surface.c.v @@ -18,7 +18,7 @@ pub type BlitMap = C.SDL_BlitMap // NOTE This structure should be treated as read-only, except for `pixels`, // which, if not NULL, contains the raw pixel data for the surface. // -@[typedef] +@[noinit; typedef] pub struct C.SDL_Surface { pub: flags u32 // Read-only diff --git a/thread.c.v b/thread.c.v index 91fdbedb..00ef5524 100644 --- a/thread.c.v +++ b/thread.c.v @@ -7,7 +7,7 @@ module sdl // SDL_thread.h // -@[typedef] +@[noinit; typedef] pub struct C.SDL_Thread { } diff --git a/video.c.v b/video.c.v index c6e06265..56217782 100644 --- a/video.c.v +++ b/video.c.v @@ -60,7 +60,7 @@ pub type DisplayMode = C.SDL_DisplayMode // See also: SDL_SetWindowTitle() // See also: SDL_ShowWindow() // -@[typedef] +@[noinit; typedef] pub struct C.SDL_Window { }