You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
之前改的那一版,本来是想着跟原生C写扩展一样,尽量用static的变量和函数,这样扩展需要用到的这些东西,就直接加载到内存里面,加快php加载扩展的时间,但是发现比较难实现,需要大量的宏和nightly特性,也不够灵活,然后就搁置了。
后来想想其实也不需要,毕竟php加载扩展也就一次性的,于是,参考了一下C++的框架方案PHP-CPP,重新改了一版。但是,工作量有点大,毕竟需要兼容这么多版本,而且以后还想兼容Windows和ZTS模式。
况且我对PHP的机制还不算熟悉,只能一边研究一边写。PHP的内核和扩展开发之类的资料太少了,内核代码也不写注释的,很难琢磨某些长得差不多的函数的区别。而且滥用C的宏,还有在头文件里面写static函数,这些导致Rust去封装需要比较绕的方式。
就这样吧,先合并到master。
Beta Was this translation helpful? Give feedback.
All reactions