Implementing some FFI i reached the following situation:
1) int ssh_pki_import_pubkey_file (const char * filename, ssh_key * pkey) | in GS #( #'const char*' #'ptr')
This functions populate a ssh_key struct (a GS CPointer instance) and is working ok.
Now i want to call the following function:
2) int ssh_userauth_try_publickey (ssh_session session, const char * username, const ssh_key pubkey) | in GS #( #'ptr' #'const char*' #'ptr' )
The ssh_key struct is the same but with const instead of a *.
If the result of 1) (aCPointer) is passed as received from FFI to function 2) --> function 2) fail.
In this case at GS level the struct is #'ptr'.
Then i tried to modify the FFI call with #'&ptr' to get the value of the pointer (so i can match const ssh_key) but it also fail.
How i should update a CPointer of 1) instance to match const ssh_key of 2) ? (where ssh_key is a struct)
regards,
bruno