Skip to content

Commit 50b3a0d

Browse files
authored
Add comments about internal headers (GH-15689)
A common convention is to name internal C header files as `*_int.h`. Since a couple of these are actually installed, we add comments that this is not supposed to happen, (a) to avoid installing further internal headers, and (b) to pave the way to fix this in the next major PHP version. Somewhat special is php_gmp_int.h, where "int" is meant as abbreviation for "interface". Another common convention is appending `_priv` or `_private`, but since there have not been any issues regarding these headers so far, we refrain from adding respective comments to these headers. Anyhow, it might be a good idea to introduce some common naming convention for such internal/private headers.
1 parent 7771ec0 commit 50b3a0d

File tree

9 files changed

+18
-0
lines changed

9 files changed

+18
-0
lines changed

Zend/zend_strtod_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
/* internal header; not supposed to be installed; FIXME but unfortunately is */
20+
1921
#ifndef ZEND_STRTOD_INT_H
2022
#define ZEND_STRTOD_INT_H
2123

ext/gmp/php_gmp_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* interface header; needs to be installed; FIXME rename? */
2+
13
#ifndef incl_PHP_GMP_INT_H
24
#define incl_PHP_GMP_INT_H
35

ext/pdo_dblib/php_pdo_dblib_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
+----------------------------------------------------------------------+
1616
*/
1717

18+
/* internal header; not supposed to be installed */
19+
1820
#ifndef PHP_PDO_DBLIB_INT_H
1921
#define PHP_PDO_DBLIB_INT_H
2022

ext/pdo_firebird/php_pdo_firebird_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
/* internal header; not supposed to be installed */
18+
1719
#ifndef PHP_PDO_FIREBIRD_INT_H
1820
#define PHP_PDO_FIREBIRD_INT_H
1921

ext/pdo_mysql/php_pdo_mysql_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
/* internal header; not supposed to be installed */
20+
1921
#ifndef PHP_PDO_MYSQL_INT_H
2022
#define PHP_PDO_MYSQL_INT_H
2123

ext/pdo_odbc/php_pdo_odbc_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
/* internal header; not supposed to be installed */
18+
1719
#ifdef PHP_WIN32
1820
# define PDO_ODBC_TYPE "Win32"
1921
#endif

ext/pdo_pgsql/php_pdo_pgsql_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
/* internal header; not supposed to be installed */
20+
1921
#ifndef PHP_PDO_PGSQL_INT_H
2022
#define PHP_PDO_PGSQL_INT_H
2123

ext/standard/php_dir_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
+----------------------------------------------------------------------+
1313
*/
1414

15+
/* internal header; not supposed to be installed; FIXME but unfortunately is */
16+
1517
#ifndef PHP_DIR_INT_H
1618
#define PHP_DIR_INT_H
1719

main/streams/php_streams_int.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
/* internal header; not supposed to be installed; FIXME but unfortunately is */
18+
1719
#if ZEND_DEBUG
1820

1921
#define emalloc_rel_orig(size) \

0 commit comments

Comments
 (0)