Skip to content

Instantly share code, notes, and snippets.

@aurimasniekis
Created October 23, 2017 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aurimasniekis/a2662d66233402947bb339a35c5c82ac to your computer and use it in GitHub Desktop.
Save aurimasniekis/a2662d66233402947bb339a35c5c82ac to your computer and use it in GitHub Desktop.
# Lib
fun cf_string_get_c_string = CFStringGetCString(CfStringRef, UInt8*, CfIndex, UInt32) : Boolean
# Call
result = IOKit.cf_string_get_c_string(cf_path.as(IOKit::CfStringRef), out name, 300, IOKit::CFStringEncodingASCII)
pp String.new(name)
# Error
no overload matches 'String.new' with type UInt8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment