Skip to content

Commit ab935b7

Browse files
committed
Restructure definitions to reduce header inclusions
1 parent 460e0d4 commit ab935b7

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

ext/bcmath/bcmath.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
ZEND_DECLARE_MODULE_GLOBALS(bcmath)
3333
static PHP_GINIT_FUNCTION(bcmath);
3434
static PHP_GSHUTDOWN_FUNCTION(bcmath);
35+
static PHP_MINIT_FUNCTION(bcmath);
36+
static PHP_MSHUTDOWN_FUNCTION(bcmath);
37+
static PHP_MINFO_FUNCTION(bcmath);
3538

3639
zend_module_entry bcmath_module_entry = {
3740
STANDARD_MODULE_HEADER,

ext/bcmath/libbcmath/src/bcmath.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ typedef struct bc_struct {
5555

5656
#include <stdbool.h>
5757
#include "zend_string.h"
58-
#include "php.h" /* Needed for safe_pemalloc() in init.c */
5958
#include "../../php_bcmath.h" /* Needed for BCG() macro */
6059

6160
/* The base used in storing the numbers in n_value above.

ext/bcmath/libbcmath/src/config.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@
33
#else
44
#include <php_config.h>
55
#endif
6-
7-
#include "php.h"
8-
#include <string.h>
9-
#include "zend.h"
10-
#include "zend_alloc.h"

ext/bcmath/libbcmath/src/debug.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929
3030
*************************************************************************/
3131

32-
#include <config.h>
3332
#include <stdio.h>
34-
#include <stdlib.h>
35-
#include <ctype.h>
36-
#include <stdarg.h>
3733
#include "bcmath.h"
3834
#include "private.h"
3935

ext/bcmath/php_bcmath.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@
1818
#define PHP_BCMATH_H
1919

2020
#include "libbcmath/src/bcmath.h"
21+
#include "zend_API.h"
2122

2223
extern zend_module_entry bcmath_module_entry;
2324
#define phpext_bcmath_ptr &bcmath_module_entry
2425

2526
#include "php_version.h"
2627
#define PHP_BCMATH_VERSION PHP_VERSION
2728

28-
PHP_MINIT_FUNCTION(bcmath);
29-
PHP_MSHUTDOWN_FUNCTION(bcmath);
30-
PHP_MINFO_FUNCTION(bcmath);
31-
3229
ZEND_BEGIN_MODULE_GLOBALS(bcmath)
3330
bc_num _zero_;
3431
bc_num _one_;

0 commit comments

Comments
 (0)