0

I am trying to call a C function in swift

int getValueFromC(char ** aValue);

In swift I see the "Type" is

UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>

So i would call the function i swift using:

getValueFrom(myStringPointerPointer)

where myStringPointerPointer value would be at least initialised

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Reimond Hill
  • 4,278
  • 40
  • 52

1 Answers1

1
var aVar:UnsafeMutablePointer<CChar>? = nil
let aIntVar = getValueFromC(&aVar)
Reimond Hill
  • 4,278
  • 40
  • 52