Chage FFI::cdef() return FFI\CDef object
Nobody has claimed this yet.
- #8585 by @chopins — closed without merging
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FFI::cdef() entry point, zend_ffi_handlers.get_method, and the discussion in linked issue #8585. Establish the compatibility impact of returning FFI\CDef and passing it to non-static methods; done requires an agreed API design rather than an unresolved proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100