Swift and C Interop -


i want interoperate swift firebird database. there function named fb_interpret following header.

sc_long isc_export fb_interpret(isc_schar*,                                  unsigned int,                                  const isc_status**); 

the first 2 parameters clear me, third don't see how write pendant in swift. tried lot compile error on line.

var status = [clong](count: 20, repeatedvalue: 0) var buffer = [cchar](count: 1024, repeatedvalue: 0) let r = fb_interpret(&buffer, 0, &status) 

i know isc_status

typedef long intptr_t; typedef unsigned long uintptr_t; typedef intptr_t isc_status; 


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -