Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

改了一版#4

jmjoy started this conversation inGeneral
Apr 18, 2021· 0 comments
Discussion options

之前改的那一版,本来是想着跟原生C写扩展一样,尽量用static的变量和函数,这样扩展需要用到的这些东西,就直接加载到内存里面,加快php加载扩展的时间,但是发现比较难实现,需要大量的宏和nightly特性,也不够灵活,然后就搁置了。

后来想想其实也不需要,毕竟php加载扩展也就一次性的,于是,参考了一下C++的框架方案PHP-CPP,重新改了一版。但是,工作量有点大,毕竟需要兼容这么多版本,而且以后还想兼容Windows和ZTS模式。

况且我对PHP的机制还不算熟悉,只能一边研究一边写。PHP的内核和扩展开发之类的资料太少了,内核代码也不写注释的,很难琢磨某些长得差不多的函数的区别。而且滥用C的宏,还有在头文件里面写static函数,这些导致Rust去封装需要比较绕的方式。

就这样吧,先合并到master。

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
1 participant
@jmjoy

[8]ページ先頭

©2009-2025 Movatter.jp