//将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;
}
网友评论