ci: fix some of `v test-cleancode` 2

pull/9618/head
Delyan Angelov 2021-04-05 20:55:03 +03:00
parent fec89c7efb
commit c0e2b9b1e2
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
5 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@ pub fn utf32_to_str_no_malloc(code u32, buf voidptr) string {
icode := int(code) // Prevents doing casts everywhere
mut res := ''
unsafe {
mut buffer := byteptr(buf)
mut buffer := &byte(buf)
if icode <= 127 {
// 0x7F
buffer[0] = byte(icode)

View File

@ -7,7 +7,7 @@ pub const (
fn C.LoadLibrary(libfilename &u16) voidptr
fn C.GetProcAddress(handle voidptr, procname byteptr) voidptr
fn C.GetProcAddress(handle voidptr, procname &byte) voidptr
fn C.FreeLibrary(handle voidptr) bool

View File

@ -19,10 +19,10 @@ pub:
callbacks voidptr // Pointer to the callback function table of the native application. (struct ANativeActivityCallbacks *)
clazz voidptr // The NativeActivity object handle.
env voidptr // JNI context for the main thread of the app.
externalDataPath charptr // Path to this application's external (removable/mountable) data directory.
externalDataPath &char // Path to this application's external (removable/mountable) data directory.
instance voidptr // This is the native instance of the application.
internalDataPath charptr // Path to this application's internal data directory.
obbPath charptr // Available starting with Honeycomb: path to the directory containing the application's OBB files (if any).
internalDataPath &char // Path to this application's internal data directory.
obbPath &char // Available starting with Honeycomb: path to the directory containing the application's OBB files (if any).
sdkVersion int // The platform's SDK version code.
vm voidptr // The global handle on the process's Java VM
}

View File

@ -119,7 +119,7 @@ fn create_image(file string) Image {
return img
}
pub fn (mut ctx Context) create_image_from_memory(buf byteptr, bufsize int) Image {
pub fn (mut ctx Context) create_image_from_memory(buf &byte, bufsize int) Image {
stb_img := stbi.load_from_memory(buf, bufsize) or { return Image{} }
mut img := Image{
width: stb_img.width

View File

@ -19,9 +19,9 @@ fn C.bignum_from_int(n &Number, i u64)
fn C.bignum_to_int(n &Number) int
fn C.bignum_from_string(n &Number, s byteptr, nbytes int)
fn C.bignum_from_string(n &Number, s &byte, nbytes int)
fn C.bignum_to_string(n &Number, s byteptr, maxsize int)
fn C.bignum_to_string(n &Number, s &byte, maxsize int)
// c = a + b
fn C.bignum_add(a &Number, b &Number, c &Number)