php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79152 let load take path to library
Submitted: 2020-01-21 20:52 UTC Modified: 2021-09-16 21:23 UTC
From: flip101 at gmail dot com Assigned:
Status: Open Package: FFI (PECL)
PHP Version: 7.4.1 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
25 - 14 = ?
Subscribe to this entry?

 
 [2020-01-21 20:52 UTC] flip101 at gmail dot com
Description:
------------
https://www.php.net/manual/en/ffi.load.php

It would be useful if the load() function take a second parameter like cdef()

https://www.php.net/manual/en/ffi.cdef.php

So the original header file wouldn't need to be modified

By the way on the page that says "using special FFI_LIB defines in the loaded C header file." there is no example of this.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-23 09:00 UTC] cmb@php.net
> So the original header file wouldn't need to be modified

It seems to me that using original header files would rarely work
in practise, since the FFI parser ignores all preprocessor macros
(except the two special #defines) anyway.
 [2021-09-16 21:23 UTC] cmb@php.net
-Package: ffi +Package: FFI
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 11:01:27 2024 UTC