swift - How to create a UnsafeMutablePointer<UnsafeMutablePointer<UnsafeMutablePointer<Int8>>> -
i'm working c api swift , 1 of methods need call need give a unsafemutablepointer<unsafemutablepointer<unsafemutablepointer<int8>>> more info: swift interface: public func presage_predict(prsg: presage_t, _ result: unsafemutablepointer<unsafemutablepointer<unsafemutablepointer<int8>>>) -> presage_error_code_t original c: presage_error_code_t presage_predict(presage_t prsg, char*** result); generally, if function takes unsafepointer<t> parameter can pass variable of type t in "inout" parameter & . in case, t is unsafemutablepointer<unsafemutablepointer<int8>> which swift mapping of char ** . can call c function as var prediction : unsafemutablepointer<unsafemutablepointer<int8>> = nil if presage_predict(prsg, &prediction) == presage_ok { ... } from documentation , sample code of presage library understand allocates array of strings , assigns address of array va...