我想从Swift与Firebird数据库进行互操作。有一个名为fb_interpret
的函数,带有以下标题。
SC_LONG ISC_EXPORT fb_interpret(ISC_SCHAR*,
unsigned int,
const ISC_STATUS**);
前两个参数对我来说很清楚,但第三个参考我看不到如何在swift中编写吊坠。我尝试了很多但总是在该行上遇到编译错误。
var status = [CLong](count: 20, repeatedValue: 0)
var buffer = [CChar](count: 1024, repeatedValue: 0)
let r = fb_interpret(&buffer, 0, &status)
我已经知道isc_status
是
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef intptr_t ISC_STATUS;