ANE中的类型转换

2016-04-25  本文已影响17人  Darren_xu
//将FREObject转成NSString
NSString * getStringFromFREObject(FREObject obj)
{
  uint32_t length;
  const uint8_t *value;
  FREGetObjectAsUTF8(obj, &length, &value);
  return [NSString stringWithUTF8String:(const char *)value];
}
//将BOOL转成FREObject
FREObject createFREBool(BOOL value)
{
  FREObject fo;
  FRENewObjectFromBool(value, &fo);
  return fo;
}
上一篇下一篇

猜你喜欢

热点阅读