Skip to content

Commit

Permalink
all: add @[noinit] to structs with create_STRUCT() functions avai…
Browse files Browse the repository at this point in the history
…lable (vlang#714)
  • Loading branch information
larpon authored Jan 11, 2024
1 parent a5251d4 commit e0a6bff
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mouse.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module sdl
//
// SDL_mouse.h
//
@[typedef]
@[noinit; typedef]
pub struct C.SDL_Cursor {
}

Expand Down
6 changes: 3 additions & 3 deletions mutex.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}

Expand Down Expand Up @@ -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 {
}

Expand Down Expand Up @@ -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 {
}

Expand Down
6 changes: 3 additions & 3 deletions render.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
}

Expand Down
2 changes: 1 addition & 1 deletion surface.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion thread.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module sdl
// SDL_thread.h
//

@[typedef]
@[noinit; typedef]
pub struct C.SDL_Thread {
}

Expand Down
2 changes: 1 addition & 1 deletion video.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}

Expand Down

0 comments on commit e0a6bff

Please sign in to comment.