【发布时间】:2011-05-29 16:33:58
【问题描述】:
在为 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 c php-extension php-internals