在为 php (5.3) 编写扩展时,我想访问zend_class_entry
静态方法上的指针。
在非静态方法上,我可以像这样使用getThis()
宏和宏内Z_OBJCE_P
:
zend_class_entry ce* = Z_OBJCE_P(getThis());
现在的问题:在静态方法上,getThis()
宏返回一个null
指针,所以我不能使用Z_OBJCE_P
宏。
有没有人为我提供zend_class_entry
从静态方法访问的解决方案?
在为 php (5.3) 编写扩展时,我想访问zend_class_entry
静态方法上的指针。
在非静态方法上,我可以像这样使用getThis()
宏和宏内Z_OBJCE_P
:
zend_class_entry ce* = Z_OBJCE_P(getThis());
现在的问题:在静态方法上,getThis()
宏返回一个null
指针,所以我不能使用Z_OBJCE_P
宏。
有没有人为我提供zend_class_entry
从静态方法访问的解决方案?