函数指针的实现很简单:它们只是“代码指针(code pointer)”,它们体现在汇编语言中是用来保存子程序代码的首地址。而这种函数指针的存在只是为了保证使用了正确的调用规范。
基于22个网页-相关网页
此外,它并不指出在代码的何处这个空指针被赋值。
Furthermore, it says nothing about where in the code the null pointer was actually assigned.
在Solaris,下面这段示例代码让您可以获取堆栈指针。
On Solaris, this sample code allows you to get the stack pointer.
在得到标签的指针后,代码使用g_assert宏来确定标签是否等于NULL。
After obtaining the pointer to the label, the code USES the g_assert macro to determine if the label is equal to NULL.
> Okay. This code allocates two pointers which can point to integers.
>,好的,这段代码分配两个指针,可以指向整型数。
> Okay. Well, this code allocates a new integer pointee and this part sets x to point to it.
>,好的,呃,这段代码分配一个新的整型指针数据,这部分让x指向它。
应用推荐