什么是__CFString? [英] What is __CFString?
本文介绍了什么是__CFString?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有arg1,它是一个IMessage。 IMessage定义为:
I have arg1 which is an IMessage. IMessage is defined as:
struct IMessage {
...
struct CFString _field2;
...
};
,CFString定义为:
and CFString is defined as:
struct CFString {
void **_vptr$CFObject;
struct __CFString *mCFRef;
_Bool mIsMutable;
};
和__CFString定义为:
and __CFString is defined as:
struct __CFString;
我的目标是从arg1中获得某种字符串,无论是NSString还是CFStringRef。我做到了吗?
谢谢。
My goal is to get a string of some sort be it NSString or CFStringRef from arg1, so how can i do it? Thanks.
这是我尝试nslog mCFRef时遇到的错误:
Here is the error I get when I try to nslog mCFRef:
Thread 0 crashed:
# 1 0x97b41edb in _objc_msgSend + 0x0000001B (libobjc.A.dylib + 0x00005edb)
# 2 0x9610b5f2 in __CFStringAppendFormatAndArgumentsAux + 0x00000C42 (CoreFoundation + 0x0002c5f2)
# 3 0x9610a979 in __CFStringCreateWithFormatAndArgumentsAux + 0x00000069 (CoreFoundation + 0x0002b979)
# 4 0x961b3a3e in __CFLogvEx + 0x0000008E (CoreFoundation + 0x000d4a3e)
# 5 0x9415387c in _NSLogv + 0x0000008F (Foundation + 0x0009487c)
# 6 0x941537eb in _NSLog + 0x0000001B (Foundation + 0x000947eb)
推荐答案
我不知道您从何处获得此信息,但CFStringRef被定义为 struct __CFString * const
,因此您已经拥有了看起来类似的东西。
I don't know where you're getting this from, but CFStringRef is defined as struct __CFString *const
, so you already have something that looks equivalent.
这篇关于什么是__CFString?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文