Fix sagittarius string->pointer

This commit is contained in:
retropikzel 2024-10-17 19:54:12 +03:00
parent 6d15fb2c2b
commit 8a3edd88d8
1 changed files with 0 additions and 14 deletions

View File

@ -85,20 +85,6 @@
(lambda ()
(empty-pointer)))
(define pffi-string->pointer
(lambda (string-content)
(letrec* ((bytes (string->utf8 string-content))
(bytes-length (bytevector-length bytes))
(pointer-length (+ bytes-length 1))
(pointer (pffi-pointer-allocate pointer-length))
(looper
(lambda (index)
(when (< index bytes-length)
(pointer-set-c-uint8_t! pointer index (bytevector-u8-ref bytes index))
(looper (+ index 1))))))
(looper 0)
pointer)))
(define pffi-string->pointer
(lambda (string-content)
string-content))