1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: deprecate using V strings in C function calls (#10140)

This commit is contained in:
Enzo
2021-05-20 08:17:44 +02:00
committed by GitHub
parent b0de1f76e8
commit 906b207e58
13 changed files with 27 additions and 25 deletions

View File

@@ -62,7 +62,7 @@ fn main() {
converter := C.wkhtmltopdf_create_converter(global_settings)
println('wkhtmltopdf_create_converter: ${voidptr(converter)}')
// convert
mut result := C.wkhtmltopdf_set_object_setting(object_settings, 'page', 'http://www.google.com.br')
mut result := C.wkhtmltopdf_set_object_setting(object_settings, c'page', c'http://www.google.com.br')
println('wkhtmltopdf_set_object_setting: $result [page = http://www.google.com.br]')
C.wkhtmltopdf_add_object(converter, object_settings, 0)
println('wkhtmltopdf_add_object')

View File

@@ -48,7 +48,7 @@ fn init(mut state AppState) {
// or use DroidSerif-Regular.ttf
if bytes := os.read_bytes(os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf')) {
println('loaded font: $bytes.len')
state.font_normal = C.fonsAddFontMem(state.fons, 'sans', bytes.data, bytes.len,
state.font_normal = C.fonsAddFontMem(state.fons, c'sans', bytes.data, bytes.len,
false)
}
}

View File

@@ -101,7 +101,7 @@ fn init(user_data voidptr) {
// or use DroidSerif-Regular.ttf
if bytes := os.read_bytes(os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf')) {
println('loaded font: $bytes.len')
state.font_normal = C.fonsAddFontMem(state.fons, 'sans', bytes.data, bytes.len,
state.font_normal = C.fonsAddFontMem(state.fons, c'sans', bytes.data, bytes.len,
false)
}
}