Skip to content

Zend: Remove dependency on zend.h for certain headers #12166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Zend/zend_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <stdio.h>

#include "../TSRM/TSRM.h"
#include "zend.h"

#ifndef ZEND_MM_ALIGNMENT
# error "ZEND_MM_ALIGNMENT was not defined during configure"
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef ZEND_AST_H
#define ZEND_AST_H

#include "zend.h"
#include "zend_types.h"

#ifndef ZEND_AST_SPEC
# define ZEND_AST_SPEC 1
Expand Down
8 changes: 6 additions & 2 deletions Zend/zend_compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H

#include "zend.h"
#include "zend_ast.h"
#include "zend_types.h"
#include "zend_map_ptr.h"
#include "zend_alloc.h"

#include <stdarg.h>
#include <stdint.h>
Expand Down Expand Up @@ -85,7 +87,6 @@ typedef struct _znode { /* used only during compilation */
} u;
} znode;

/* Temporarily defined here, to avoid header ordering issues */
typedef struct _zend_ast_znode {
zend_ast_kind kind;
zend_ast_attr attr;
Expand Down Expand Up @@ -492,6 +493,9 @@ struct _zend_op_array {
#define ZEND_RETURN_VALUE 0
#define ZEND_RETURN_REFERENCE 1

#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value

/* zend_internal_function_handler */
typedef void (ZEND_FASTCALL *zif_handler)(INTERNAL_FUNCTION_PARAMETERS);

Expand Down
4 changes: 3 additions & 1 deletion Zend/zend_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#ifndef ZEND_HASH_H
#define ZEND_HASH_H

#include "zend.h"
#include "zend_types.h"
#include "zend_gc.h"
#include "zend_string.h"
#include "zend_sort.h"

#define HASH_KEY_IS_STRING 1
Expand Down
6 changes: 4 additions & 2 deletions Zend/zend_objects_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#ifndef ZEND_OBJECTS_API_H
#define ZEND_OBJECTS_API_H

#include "zend.h"
#include "zend_compile.h"
#include "zend_types.h"
#include "zend_gc.h"
#include "zend_alloc.h"
#include "zend_compile.h" /* For zend_property_info */

#define OBJ_BUCKET_INVALID (1<<0)

Expand Down
4 changes: 3 additions & 1 deletion Zend/zend_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#ifndef ZEND_STRING_H
#define ZEND_STRING_H

#include "zend.h"
#include "zend_types.h"
#include "zend_gc.h"
#include "zend_alloc.h"

BEGIN_EXTERN_C()

Expand Down
1 change: 1 addition & 0 deletions Zend/zend_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "zend_types.h"
#include "zend_gc.h"
#include "zend_hash.h"

BEGIN_EXTERN_C()

Expand Down