Fix various foreign signatures

This commit is contained in:
Harold Brenes
2025-09-29 19:58:14 -04:00
parent 9b4c0ea492
commit 24daa4427c
6 changed files with 19 additions and 7 deletions
+4 -2
View File
@@ -1,10 +1,12 @@
package CoreFoundation
import "core:c"
foreign import CoreFoundation "system:CoreFoundation.framework"
String :: distinct TypeRef // same as CFStringRef
StringEncoding :: distinct u32
StringEncoding :: distinct c.long
StringBuiltInEncodings :: enum StringEncoding {
MacRoman = 0,
@@ -171,7 +173,7 @@ foreign CoreFoundation {
// Fetches a range of the characters from a string into a byte buffer after converting the characters to a specified encoding.
StringGetBytes :: proc(thestring: String, range: Range, encoding: StringEncoding, lossByte: u8, isExternalRepresentation: b8, buffer: [^]byte, maxBufLen: Index, usedBufLen: ^Index) -> Index ---
StringIsEncodingAvailable :: proc(encoding: StringEncoding) -> bool ---
StringIsEncodingAvailable :: proc(encoding: StringEncoding) -> b8 ---
@(link_name = "__CFStringMakeConstantString")
StringMakeConstantString :: proc "c" (#const c: cstring) -> String ---