【发布时间】:2017-07-21 13:51:26
【问题描述】:
我正在尝试通过具有此签名的 GData.ContactsContact.get_photo() 检索联系人照片:
get_photo(
GDataContactsContact *self,
GDataContactsService *service,
gsize *length, (out caller-allocates)
gchar **content_type, (out caller-allocates)
GCancellable *cancellable,
GError *error
)
但是,如果我只是为此声明一个“调用者分配”变量(例如let length;)或为 length 实例化一个新的 G_TYPE,结果总是:
Gjs-Message: JS ERROR: Unsupported type guint64 for (out caller-allocates)
我只能找到similar problems 的几个旧示例,它们都涉及注释错误:
该方法的注释似乎不正确。它应该是(out caller-allocates)(数组长度=长度)。
这是一个自省错误,我可以解决和/或提交错误,还是我误解了 Javascript 中的“out caller-allocates”用法?
【问题讨论】: