LombaX
LombaX

Reputation: 17364

Swift - What is the meaning of this code hint?

I have this type hinting in Swift and I don't understand the meaning:

FLSwiftUtils.getType(<#var: CMutablePointer<COpaquePointer>#>)

FLSwiftUtils is an Objc class, and getType a method.

What I don't understand is the semantical meaning of the type-hinting:

`<#var: CMutablePointer<COpaquePointer>#>` 

(<# #> are placeholder for xcode to "highlight" the hinting, so you can copy-paste it)

This function expects a CMutablePointer, and this is ok, I know what is it, but what about the inside the brackets? As I understand, inside angle brackets you can have a generic type or a protocol, but COpaquePointer is not a generic type nor a protocol, it's a struct.

So, what is the meaning of CMutablePointer ?

Upvotes: 0

Views: 262

Answers (1)

zneak
zneak

Reputation: 138051

CMutablePointer is a generic type, COpaquePointer is what is inside. This is a pointer to a pointer.

Upvotes: 1

Related Questions