1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Máté Kocsis
6988973bc6 Declare type for ext/ffi internal class constants
Since the relevant classes are final, it's straightforward to declare the type of these class constants
2023-07-18 10:09:26 +02:00
Máté Kocsis
148ac364e9 Customize the link of some constants in the manual
These changes are necessary because the links which are generated by default are already taken.
2023-01-19 09:05:32 +01:00
Máté Kocsis
e328c68305 Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Máté Kocsis
413cbdf72f Declare FFI::__BIGGEST_ALIGNMENT__ in stubs as well 2022-06-04 09:59:29 +02:00
Máté Kocsis
d476da7818 Declare ext/ffi constants in stubs (#8695) 2022-06-04 09:51:27 +02:00
Máté Kocsis
2378f35787 Use single line phpdoc in stubs where possible 2021-07-20 13:16:56 +02:00
Joe Watkins
570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Máté Kocsis
b382883696 Indent stubs inside global namespace blocks (#7261) 2021-07-20 10:23:58 +02:00
Nikita Popov
02b803a5fd Rename getStructFieldOffset/Type() parameter
By convention, parameter names of camel case methods should also
be camel case, i.e. the name should be $fieldName rather than
$field_name.

However, following GH-7236, which changed $arg_index to just $index,
this also changes $field_name to just $name. The fact that it is
a field name is obvious from context.
2021-07-14 15:13:42 +02:00
Tyson Andre
efbdcb8e49 Rename FFI getFuncArg* to getFuncParameter*, $arg_index->$index (#7236)
PHP is already already using "Parameter" instead of "Argument" for reflection on types elsewhere.

Parameter is used to refer to the function declarations
(AST_PARAM internally in the AST, ReflectionFunctionAbstract->getParameters(),
etc.)
Argument is used to refer to expressions passed to the functions by the caller
(ArgumentCountError, etc.).
(Error messages were also changed in php 8.x to refer to passing too many arguments to a
function)

Other languages use similar definitions,
e.g. https://developer.mozilla.org/en-US/docs/Glossary/Parameter
2021-07-14 09:12:25 -04:00
Dmitry Stogov
a2845e32cb FFI::CType reflection API 2021-07-13 13:13:51 +03:00
Máté Kocsis
99b08ac281 Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
2021-02-09 13:37:24 +01:00
Máté Kocsis
98fb565c74 Generate class entries from stubs for another batch of extensions
Closes GH-6669
2021-02-08 19:53:55 +01:00
Nikita Popov
973138f39d Add support for union types for internal functions
This closes the last hole in the supported types for internal
function arginfo types. It's now possible to represent unions of
multiple classes. This is done by storing them as TypeA|TypeB and
PHP will then convert this into an appropriate union type list.

Closes GH-6581.
2021-01-12 10:14:41 +01:00
Christoph M. Becker
13f898b56a Fix ffi stubs
Closes GH-6543.
2020-12-28 19:04:47 +01:00
Máté Kocsis
ab4c5976d7 Fix the signature of FFI::typeof() and FFI::memcmp() 2020-12-24 11:45:32 +01:00
Máté Kocsis
ed19cb6518 Fix the signature of FFI::sizeof() and FFI::alignof() 2020-12-24 11:39:09 +01:00
Nikita Popov
22ab18c2aa Update ext/ffi parameter names
Closes GH-6282.
2020-10-07 12:29:50 +02:00
Nikita Popov
2d234d111a Declare FFI\CType in namespace
Now that it is supported, declare that CType is part of the FFI
namespace, not a freestanding class.
2020-10-02 17:54:34 +02:00
chopins
bea44429d3 Added FFI\CType::getName() method 2020-09-10 09:14:45 +03:00
Máté Kocsis
f7fbc6333f Add more precise type info for stubs
Closes GH-6005
2020-09-01 16:35:56 +02:00
Máté Kocsis
2803c8fb8d Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +02:00
Máté Kocsis
596561009c Fix some UNKNOWN default values
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
Máté Kocsis
3ebce8e9fc Fix UNKNOWN default values in various extensions
Closes GH-5514
2020-05-05 19:08:20 +02:00
Nikita Popov
7d1c806491 Clarify that FFI::cdef() does not return NULL 2020-04-28 14:46:04 +02:00
Máté Kocsis
c6485535c2 Generate method entries from stubs for curl, ffi, pdo, phar
Closes GH-5375
2020-04-14 11:49:02 +02:00
Máté Kocsis
ca006e54e3 Add missing visibility modifiers in stubs 2020-04-11 10:23:51 +02:00
Nikita Popov
abfdfc9ff8 Add return types to FFI methods
The FFI class is final, so we can use proper return types.
2020-02-18 10:28:43 +01:00
Nikita Popov
169805777c Merge branch 'PHP-7.4'
* PHP-7.4:
  Apply tidy formatting
2020-02-03 13:42:08 +01:00
Dmitry Stogov
0128f6eb84 Merge branch 'PHP-7.4'
* PHP-7.4:
  NEWS entry, test and minor cleanup for FFI::isNull()
  add FFI::isNull() to check whether a FFI\CData is a null pointer
2019-09-10 11:34:08 +03:00
Christoph M. Becker
e047e9d893 Add ext/ffi stubs 2019-08-26 15:25:27 +02:00