Skip to content

Commit 449eb47

Browse files
committed
Moved object defs out of magical header file
1 parent 6342fd4 commit 449eb47

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

ext/gd/gd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
#endif
5757

5858

59-
# include "gd_compat.h"
60-
59+
#include "gd_compat.h"
60+
#include "gd_image_object.h"
6161

6262
static int le_gd, le_gd_font;
6363

ext/gd/gd_ctx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include "php_gd.h"
20+
#include "gd_image_object.h"
2021

2122
#define CTX_PUTC(c,ctx) ctx->putC(ctx, c)
2223

ext/gd/gd_image_object.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| PHP Version 7 |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) The PHP Group |
6+
+----------------------------------------------------------------------+
7+
| This source file is subject to version 3.01 of the PHP license, |
8+
| that is bundled with this package in the file LICENSE, and is |
9+
| available through the world-wide-web at the following url: |
10+
| http://www.php.net/license/3_01.txt |
11+
| If you did not receive a copy of the PHP license and are unable to |
12+
| obtain it through the world-wide-web, please send a note to |
13+
| [email protected] so we can mail you a copy immediately. |
14+
+----------------------------------------------------------------------+
15+
| Authors: Mark Randall <[email protected]> |
16+
+----------------------------------------------------------------------+
17+
*/
18+
19+
#ifndef SRC_GD_IMAGE_OBJECT_H
20+
#define SRC_GD_IMAGE_OBJECT_H
21+
22+
#include <php.h>
23+
#include <gd.h>
24+
25+
zend_class_entry *gd_image_ce;
26+
27+
#define GD_IMAGE_PTR_FROM_ZVAL_P(x) (((gd_ext_image_object*)Z_OBJ_P(x))->image)
28+
29+
static zend_object* gd_ext_image_object_init(zval* val, gdImagePtr image);
30+
31+
typedef struct _gd_ext_image_object {
32+
zend_object std;
33+
gdImagePtr image;
34+
} gd_ext_image_object;
35+
36+
37+
#endif //SRC_GD_IMAGE_OBJECT_H

ext/gd/php_gd.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@
2222

2323
#if defined(HAVE_LIBGD) || defined(HAVE_GD_BUNDLED)
2424

25-
#include <gd.h>
26-
27-
zend_class_entry *gd_image_ce;
28-
29-
#define GD_IMAGE_PTR_FROM_ZVAL_P(x) (((gd_ext_image_object*)Z_OBJ_P(x))->image)
30-
31-
static zend_object* gd_ext_image_object_init(zval* val, gdImagePtr image);
32-
33-
typedef struct _gd_ext_image_object {
34-
zend_object std;
35-
gdImagePtr image;
36-
} gd_ext_image_object;
37-
3825
/* open_basedir and safe_mode checks */
3926
#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
4027
if (!filename || php_check_open_basedir(filename)) { \

0 commit comments

Comments
 (0)