Chage FFI::cdef() return FFI\CDef object
还没有人认领这个 Issue。
- #8585 来自 @chopins —— 已关闭,未合并
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Now, FFI::cdef() return a FFI object, then through FFI object call C function.
The above reasons cause some method support call by statically and non-statically, and these method will need exclude in zend_ffi_handlers.get_method. if C DLL has same name function will not be call, or add new FFI method must insert to execlude list.
So suggest FFI::cdef() return object of other class, For example use FFI\CDef instead of FFI object.
FFI\CDef is not construrct and extend in PHP code, Similarly FFI\CData.
Through FFI\CDef of zend_ffi_handlers.get_method will call C function. and FFI non-statically method add one paramter receive FFI\CDef object. this is cause in compatibility.
see: #8585
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从入口点 FFI::cdef()、zend_ffi_handlers.get_method 以及关联 issue #8585 中的讨论开始。确定返回 FFI\CDef 并将其传递给非 static 方法的兼容性影响;完成的要求是达成一致的 API 设计,而不是留下未解决的提案。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100