1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/ffi/tests/bug79075.h
Niels Dossche 612a34cbec Fix bug #79075: FFI header parser chokes on comments
The directives for FFI should be first in the file, which is fine,
however sometimes there can be comments or whitespace before or between
these defines. One practical example is for license information or when
a user adds newlines "by accident". In these cases, it's quite confusing
that the directives do not work properly.
To solve this, make the zend_ffi_parse_directives() aware of comments.

Closes GH-17082.
2024-12-09 22:29:02 +01:00

13 lines
188 B
C

/*
* Multiline comment
*/
// whitespace line
#define ignore_this_line 1
//
#define/* inline */FFI_SCOPE /* multi-
line */ "bug79075" /* end
*/
int printf(const char *format, ...);