mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
checker: do not allow &u8(0), force nil like we do with &Type(0)
This commit is contained in:
parent
3ab660b4c6
commit
7d57a19d7e
52 changed files with 184 additions and 118 deletions
|
@ -72,7 +72,7 @@ fn main() {
|
|||
error_code := C.wkhtmltopdf_http_error_code(converter)
|
||||
println('wkhtmltopdf_http_error_code: ${error_code}')
|
||||
if result {
|
||||
pdata := &char(0)
|
||||
pdata := &char(unsafe { nil })
|
||||
ppdata := &pdata
|
||||
size := C.wkhtmltopdf_get_output(converter, voidptr(ppdata))
|
||||
println('wkhtmltopdf_get_output: ${size} bytes')
|
||||
|
|
|
@ -37,7 +37,7 @@ fn create_texture(w int, h int, buf &u8) (gfx.Image, gfx.Sampler) {
|
|||
height: h
|
||||
num_mipmaps: 0
|
||||
// usage: .dynamic
|
||||
label: &char(0)
|
||||
label: &char(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment, if .dynamic is enabled
|
||||
|
|
|
@ -61,7 +61,7 @@ fn create_texture(w int, h int, buf &u8) (gfx.Image, gfx.Sampler) {
|
|||
height: h
|
||||
num_mipmaps: 0
|
||||
// usage: .dynamic
|
||||
label: &char(0)
|
||||
label: &char(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment if .dynamic is enabled
|
||||
|
|
|
@ -64,7 +64,7 @@ fn create_texture(w int, h int, buf &u8) (gfx.Image, gfx.Sampler) {
|
|||
// usage: .dynamic
|
||||
// wrap_u: .clamp_to_edge
|
||||
// wrap_v: .clamp_to_edge
|
||||
label: &char(0)
|
||||
label: &char(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment if .dynamic is enabled
|
||||
|
|
|
@ -75,7 +75,7 @@ fn create_texture(w int, h int, buf byteptr) (gfx.Image, gfx.Sampler) {
|
|||
//usage: .dynamic
|
||||
// wrap_u: .clamp_to_edge
|
||||
// wrap_v: .clamp_to_edge
|
||||
label: &char(0)
|
||||
label: &char(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// vfmt on
|
||||
|
|
|
@ -29,7 +29,7 @@ pub fn create_texture(w int, h int, buf &u8) (gfx.Image, gfx.Sampler) {
|
|||
// usage: .dynamic
|
||||
// wrap_u: .clamp_to_edge
|
||||
// wrap_v: .clamp_to_edge
|
||||
label: &char(0)
|
||||
label: &char(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment if .dynamic is enabled
|
||||
|
|
|
@ -119,7 +119,7 @@ fn create_texture(w int, h int, buf &u8) (gfx.Image, gfx.Sampler) {
|
|||
height: h
|
||||
num_mipmaps: 0
|
||||
// usage: .dynamic
|
||||
label: &u8(0)
|
||||
label: &u8(unsafe { nil })
|
||||
d3d11_texture: 0
|
||||
}
|
||||
// comment if .dynamic is enabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue