Skip to content

Commit 5bfd3fa

Browse files
CODING_STANDARDS.md: establish C99 as the implementation language (#10631)
PHP 8 switched to C99, but did not documented that anywhere. After @derickr rejected a pull request on timelib (derickr/timelib#141 (comment)) because my suggested change removed compile-time checks for fixed-width integer types, pointing out that they are optional in the C99 standard, @nikic disagreed with using `uint_least8_t` instead (which is guaranteed to be available), stating that "We already make extensive use of uint8_t, you can assume it exists" (#10621 (review)). In order to avoid such confusion in the future, let's document this architecture requirement.
1 parent 7029fd0 commit 5bfd3fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CODING_STANDARDS.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ rewritten to comply with these rules.
99

1010
1. Document your code in source files and the manual. (tm)
1111

12+
1. PHP is implemented in C99. The optional fixed-width integers from
13+
stdint.h (int8_t, int16_t, int32_t, int64_t and their unsigned
14+
counterparts) must be available.
15+
1216
1. Functions that are given pointers to resources should not free them.
1317

1418
For instance, `function int mail(char *to, char *from)` should NOT free `to`

0 commit comments

Comments
 (0)