Commit graph

26 commits

Author SHA1 Message Date
David Zhong
52c91f0fb7
Fix FFI Parsing of Pointer Declaration Lists (#17794)
* Fix ffi parsing of pointer declaration lists

* Fix ffi pointer declaration lists grammar
2025-02-17 10:27:11 +03:00
Niels Dossche
c0de7214aa
Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
For top-level anonymous type definition we never store the declaration anywhere
else nor the type anywhere else.
The declaration keeps owning the type and it goes out of scope.
For anonymous fields this gets handled by the add_anonymous_field code that
removes the type from the declaration.
This patch does something similar in the parsing code when it is
detected we're dealing with an anonymous enum in a top-level declaration.

Closes GH-14839.
2024-07-22 17:44:47 +02:00
Dmitry Stogov
d6efff7254
Fix Windows build 2024-07-22 16:41:16 +03:00
Dmitry Stogov
13e9b40517
Regenerate FFI parser using HEAD version of LLK 2024-07-22 16:01:26 +03:00
Gina Peter Banyard
554541c4db
ext/ffi: Fix [-Wenum-int-mismatch] compiler warning 2024-05-21 12:17:25 +01:00
Dmitry Stogov
46c09a34d5 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined)
2021-09-15 14:53:00 +03:00
Dmitry Stogov
594cba7f8e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined)
2021-09-15 14:49:35 +03:00
Dmitry Stogov
0badc7de96 Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined) 2021-09-15 14:48:33 +03:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Dmitry Stogov
6e9dd13d63 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78714 (funcs returning pointer can't use call convention spec)
2019-11-11 12:09:47 +03:00
Dmitry Stogov
ecd0c5b6ad Fixed bug #78714 (funcs returning pointer can't use call convention spec) 2019-11-11 12:07:48 +03:00
Christoph M. Becker
6c078d8bd5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Implement #78270: Support __vectorcall convention with FFI
2019-10-29 08:58:17 +01:00
Christoph M. Becker
bedbecf56d Implement #78270: Support __vectorcall convention with FFI
To work around the limitation of the current rudimentary vectorcall
support in our patched libffi, we forbid yet unsupported declarations,
i.e. float/double parameters at certain positions (SIMD vector types
and HVA types are not supported anyway).
2019-10-29 08:57:43 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Dmitry Stogov
5f555fb19e Fixed bad format string 2019-09-11 00:52:54 +03:00
Dmitry Stogov
1e0b0467b6 Fixed memory leaks in ext/ffi/tests/100.phpt on Mac OSX 2019-06-17 14:40:19 +03:00
Dmitry Stogov
61ad294f26 Partial support for GCC mode attribute. 2019-03-29 17:28:57 +03:00
Dmitry Stogov
745dd94e55 Added support for more GCC extensions: attributes, __extension__, __asm__ (ignored) 2019-03-29 02:36:55 +03:00
Dmitry Stogov
363e8dd69d Support for __restrict and few GCC attributes 2019-03-28 03:01:20 +03:00
Dmitry Stogov
984d05f948 Use semantic predicates to simplify lookahead and reduce backtracking 2019-03-28 01:21:06 +03:00
Dmitry Stogov
164b7ec549 Regenerate parser 2019-03-25 21:45:10 +03:00
Dmitry Stogov
2ccc27bcfc Fixed incorrect error message 2019-03-20 02:41:08 +03:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Dmitry Stogov
e089d506d5 Added FFI extension 2019-01-14 11:47:50 +03:00