Hi,
using the PLT-Scheme-FFI, I want to call the C-function
unsigned long mysql_real_escape_string(MYSQL *con, char *to, const char *from, unsigned long length)
from a scheme procedure and continue using the resulting string 'to' inside the caller. The call of the scheme procedure would go like this:
(define-values (to) (escape-string con ??? from (+ (string-length from) 1)))
where con is a valid connection to a MySQL-DB and escape-string is defined by
(define escape-string (get-ffi-obj "mysql_real_escape_string" libmysql
(_fun (con to from length) ::
(con : _pointer)
(to : (_ptr io _byte))
(from : _string)
(length : _ulong)
-> (res : _ulong)
-> (values out))))
The problem is, I have no idea what to pass for '???' when calling escape-string nor do I know whether the definition of escape-string is correct.
Any help would be appreciated.
Regards,
Ralf S.