我从类型UnsafeMutablePointer<UInt>
我可以将其投放到UInt
吗?
答案 0 :(得分:2)
只需使用let ptr: UnsafeMutablePointer<UInt> = funcReturningMutablePtr()
let theValue: UInt = ptr.memory
属性即可访问基础数据。
var list = "";
container.children("*").each(function()
{
if(list)
{
list += ",";
}
list += jQuery(this).data("item-name");
});
类型注释是为了清晰起见,但不是必需的。