AOP-PHP / AOP

AOP in PHP
Other
565 stars 95 forks source link

A better fix for duplicate symbols #55

Closed ralphschindler closed 11 years ago

ralphschindler commented 11 years ago

Unfortunately, the last PR which externed:

zval * (*zend_std_read_property)(zval *object, zval *member, int type AOP_KEY_D TSRMLS_DC);
zval ** (*zend_std_get_property_ptr_ptr)(zval *object, zval *member AOP_KEY_D TSRMLS_DC);

Did not fully work. Moving these into the aop.c file does indeed fix the problem and the extension does work again (I've confirmed.) In addition to the moving of the ZEND_DECLARE_MODULE_GLOBALS(aop), this is a better fix, but IMO, probably not the best for long term code organization.

It seems there is stuff in aop.h that is specific to aop.c, but not global to the extension itself. Since there are declarations that are shared between the lexer and the aop.c implementation, it might be better to move all shared declarations into, for example, a php_aop.h file, and leave only declarations for the aop.c stuff in aop.h (like this zendstd* stuff, and the DECLARE macro call.)

I am novice at best, so perhaps as for organization goes, a discussion with some of the more senior devs in #php.pecl would be in order.