Skip to content

Commit

Permalink
fix char
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Oct 14, 2023
1 parent 0533372 commit 8034383
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernel/modules/lib/stubs/file.v
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn fgets(str charptr, count u64, stream &FILE) charptr {
}

[export: 'popen']
pub fn popen(command &C.char, typ &C.char) &FILE {
pub fn popen(command &char, typ &char) &FILE {
lib.kpanic(voidptr(0), c'popen is a stub')
}

Expand Down
10 changes: 5 additions & 5 deletions kernel/modules/lib/stubs/string.v
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub fn memcmp(_s1 &C.void, _s2 &C.void, size u64) int {
}

[export: 'strcpy']
pub fn strcpy(dest &C.char, src &C.char) &C.char {
pub fn strcpy(dest &char, src &char) &char {
mut i := u64(0)

unsafe {
Expand All @@ -105,7 +105,7 @@ pub fn strcpy(dest &C.char, src &C.char) &C.char {
}

[export: 'strncpy']
pub fn strncpy(dest &C.char, src &C.char, n u64) &C.char {
pub fn strncpy(dest &char, src &char, n u64) &char {
mut i := u64(0)

unsafe {
Expand Down Expand Up @@ -135,7 +135,7 @@ pub fn strncpy(dest &C.char, src &C.char, n u64) &C.char {
}

[export: 'strcmp']
pub fn strcmp(_s1 &C.char, _s2 &C.char) int {
pub fn strcmp(_s1 &char, _s2 &char) int {
unsafe {
mut i := u64(0)
s1 := &u8(_s1)
Expand All @@ -160,7 +160,7 @@ pub fn strcmp(_s1 &C.char, _s2 &C.char) int {
}

[export: 'strncmp']
pub fn strncmp(_s1 &C.char, _s2 &C.char, size u64) int {
pub fn strncmp(_s1 &char, _s2 &char, size u64) int {
unsafe {
s1 := &u8(_s1)
s2 := &u8(_s2)
Expand All @@ -182,7 +182,7 @@ pub fn strncmp(_s1 &C.char, _s2 &C.char, size u64) int {
}

[export: 'strlen']
pub fn strlen(_ptr &C.char) u64 {
pub fn strlen(_ptr &char) u64 {
mut i := u64(0)

unsafe {
Expand Down

0 comments on commit 8034383

Please sign in to comment.