Skip to content
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
6 changes: 3 additions & 3 deletions Zend/zend_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ typedef struct _zend_mm_debug_info {
} zend_mm_debug_info;

# define ZEND_MM_OVERHEAD ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info))
#else
#else
# define ZEND_MM_OVERHEAD 0
#endif

Expand Down Expand Up @@ -376,7 +376,7 @@ static void apc_init_heap(void)

// Preallocate properly aligned SHM chunks (64MB)
tmp_data.mem = shm_memalign(ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE * 32);

// Initialize temporary storage data
tmp_data.free_pages = 0;

Expand All @@ -389,7 +389,7 @@ static void apc_init_heap(void)
zend_hash_init(apc_ht, 64, NULL, ZVAL_PTR_DTOR, 0);
zend_mm_set_heap(old_heap);
}

*/

END_EXTERN_C()
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_generators.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern ZEND_API zend_class_entry *zend_ce_ClosedGeneratorException;
typedef struct _zend_generator_node zend_generator_node;
typedef struct _zend_generator zend_generator;

/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators.
/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators.
* The solution to this problem is a doubly-linked tree, which all Generators referenced in maintain a reference to. It should be impossible to avoid walking the tree in all cases. This way, we only need tree walks from leaf to root in case where some part of the `yield from` chain is passed to another `yield from`. (Update of leaf node pointer and list of multi-children nodes needed when leaf gets a child in direct path from leaf to root node.) But only in that case, which should be a fairly rare case (which is then possible, but not totally cheap).
* The root of the tree is then the currently executed Generator. The subnodes of the tree (all except the root node) are all Generators which do `yield from`. Each node of the tree knows a pointer to one leaf descendant node. Each node with multiple children needs a list of all leaf descendant nodes paired with pointers to their respective child node. (The stack is determined by leaf node pointers) Nodes with only one child just don't need a list, there it is enough to just have a pointer to the child node. Further, leaf nodes store a pointer to the root node.
* That way, when we advance any generator, we just need to look up a leaf node (which all have a reference to a root node). Then we can see at the root node whether current Generator is finished. If it isn't, all is fine and we can just continue. If the Generator finished, there will be two cases. Either it is a simple node with just one child, then go down to child node. Or it has multiple children and we now will remove the current leaf node from the list of nodes (unnecessary, is microoptimization) and go down to the child node whose reference was paired with current leaf node. Child node is then removed its parent reference and becomes new top node. Or the current node references the Generator we're currently executing, then we can continue from the YIELD_FROM opcode. When a node referenced as root node in a leaf node has a parent, then we go the way up until we find a root node without parent.
Expand Down
10 changes: 5 additions & 5 deletions Zend/zend_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static zend_always_inline zval *zend_hash_find_ind(const HashTable *ht, zend_str
zval *zv;

zv = zend_hash_find(ht, key);
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv;
}

Expand Down Expand Up @@ -367,7 +367,7 @@ static zend_always_inline zval *zend_hash_str_find_ind(const HashTable *ht, cons
zval *zv;

zv = zend_hash_str_find(ht, str, len);
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ?
((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv;
}

Expand Down Expand Up @@ -1088,7 +1088,7 @@ static zend_always_inline zval *_zend_hash_append(HashTable *ht, zend_string *ke
if (!ZSTR_IS_INTERNED(key)) {
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
zend_string_addref(key);
zend_string_hash_val(key);
zend_string_hash_val(key);
}
p->key = key;
p->h = ZSTR_H(key);
Expand All @@ -1110,7 +1110,7 @@ static zend_always_inline zval *_zend_hash_append_ptr(HashTable *ht, zend_string
if (!ZSTR_IS_INTERNED(key)) {
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
zend_string_addref(key);
zend_string_hash_val(key);
zend_string_hash_val(key);
}
p->key = key;
p->h = ZSTR_H(key);
Expand All @@ -1132,7 +1132,7 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string
if (!ZSTR_IS_INTERNED(key)) {
ht->u.flags &= ~HASH_FLAG_STATIC_KEYS;
zend_string_addref(key);
zend_string_hash_val(key);
zend_string_hash_val(key);
}
p->key = key;
p->h = ZSTR_H(key);
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_strtod_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#endif

/* TODO check to undef this option, this might
make more perf. destroy_freelist()
make more perf. destroy_freelist()
should be adapted then. */
#define Omit_Private_Memory 1

Expand Down Expand Up @@ -140,7 +140,7 @@ typedef unsigned long int uint32_t;
} else if (1 == x) { \
tsrm_mutex_unlock(pow5mult_mutex); \
}


#endif

Expand Down
12 changes: 6 additions & 6 deletions Zend/zend_vm_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ ZEND_VM_INLINE_HELPER(zend_binary_assign_op_helper, VAR|UNUSED|THIS|CV, CONST|TM
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, binary_op);
}
# endif

ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, binary_op);
#endif
}
Expand Down Expand Up @@ -1514,7 +1514,7 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);

retval = zend_fetch_static_property_address(varname, OP1_TYPE, opline->op2, OP2_TYPE, type EXECUTE_DATA_CC OPLINE_CC);

if (UNEXPECTED(retval == NULL)) {
if (EG(exception)) {
FREE_OP1();
Expand Down Expand Up @@ -2485,7 +2485,7 @@ ZEND_VM_HOT_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, JMP_ADDR)
zval *val;

val = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);

if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
ZEND_VM_CONTINUE();
Expand Down Expand Up @@ -3219,7 +3219,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR,

if (OP1_TYPE == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
(opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
if (Z_TYPE(EX(This)) == IS_OBJECT) {
ce = Z_OBJCE(EX(This));
Expand Down Expand Up @@ -3688,7 +3688,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL))
} else {
zend_execute_internal(call, ret);
}

#if ZEND_DEBUG
if (!EG(exception) && call->func) {
ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
Expand Down Expand Up @@ -6323,7 +6323,7 @@ ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLA

if (OP1_TYPE == IS_CONST && value) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(RT_CONSTANT(opline, opline->op1)), ce, value);
}
}

if (OP1_TYPE != IS_CONST) {
zend_tmp_string_release(tmp_name);
Expand Down
2 changes: 1 addition & 1 deletion ext/fileinfo/libmagic/cdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ typedef struct {
typedef struct {
uint16_t ce_namlen;
uint32_t ce_num;
uint64_t ce_timestamp;
uint64_t ce_timestamp;
uint16_t ce_name[256];
} cdf_catalog_entry_t;

Expand Down
4 changes: 2 additions & 2 deletions ext/fileinfo/libmagic/elfclass.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) Christos Zoulas 2008.
* All Rights Reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
Expand All @@ -11,7 +11,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down
10 changes: 5 additions & 5 deletions ext/fileinfo/libmagic/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* $Log$
* Revision 1.9 2016/10/11 22:27:12 ab
* Update libmagic to 5.28
*
*
* $Log$
* Revision 1.9 2015/03/06 22:27:12 ab
* Update libmagic to 5.2X
Expand Down Expand Up @@ -369,14 +369,14 @@
* Numerous changes from Guy Harris too numerous to mention but including
* byte-order independance, fixing "old-style masking", etc. etc. A bugfix
* for broken symlinks from martin@@d255s004.zfe.siemens.de.
*
*
* Revision 1.7 93/01/05 14:57:27 ian
* Couple of nits picked by Christos (again, thanks).
*
*
* Revision 1.6 93/01/05 13:51:09 ian
* Lotsa work on the Magic directory.
*
*
* Revision 1.5 92/09/14 14:54:51 ian
* Fix a tiny null-pointer bug in previous fix for tar archive + uncompress.
*
*
*/
4 changes: 2 additions & 2 deletions ext/mbstring/oniguruma/src/oniguruma.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ typedef struct {
OnigCodePoint one_or_more_time;
OnigCodePoint anychar_anytime;
} OnigMetaCharTableType;

typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);

typedef struct OnigEncodingTypeST {
Expand Down Expand Up @@ -549,7 +549,7 @@ ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax;
#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22
#define ONIGERR_FAIL_TO_INITIALIZE -23
/* general error */
#define ONIGERR_INVALID_ARGUMENT -30
#define ONIGERR_INVALID_ARGUMENT -30
/* syntax error */
#define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100
#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/oniguruma/src/regenc.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,6 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[];
#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \
(ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\
ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER))


#endif /* REGENC_H */
2 changes: 1 addition & 1 deletion ext/mbstring/unicode_data.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* This file was generated from a modified version UCData's ucgendat.
*
* DO NOT EDIT THIS FILE!
*
*
* Instead, compile ucgendat.c (bundled with PHP in ext/mbstring), download
* the appropriate UnicodeData-x.x.x.txt and CompositionExclusions-x.x.x.txt
* files from http://www.unicode.org/Public/ and run this program.
Expand Down
18 changes: 9 additions & 9 deletions ext/oci8/php_oci8_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern zend_class_entry *oci_coll_class_entry_ptr;
#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE2
#else
#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE
#endif
#endif

/* The mode parameter for oci_connect() is overloaded and accepts both
* privilege and external authentication flags OR'd together.
Expand Down Expand Up @@ -136,7 +136,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_connection */
typedef struct {
typedef struct {
zend_resource *id; /* resource ID */
OCIEnv *env; /* private env handle */
ub2 charset; /* charset ID */
Expand Down Expand Up @@ -170,7 +170,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_descriptor */
typedef struct {
typedef struct {
zend_resource *id;
zend_ulong index; /* descriptors hash table index */
php_oci_connection *connection; /* parent connection handle */
Expand All @@ -187,15 +187,15 @@ typedef struct {
/* }}} */

/* {{{ php_oci_lob_ctx */
typedef struct {
typedef struct {
char **lob_data; /* address of pointer to LOB data */
ub4 *lob_len; /* address of LOB length variable (bytes) */
ub4 alloc_len;
} php_oci_lob_ctx;
/* }}} */

/* {{{ php_oci_collection */
typedef struct {
typedef struct {
zend_resource *id;
php_oci_connection *connection; /* parent connection handle */
OCIType *tdo; /* collection's type handle */
Expand All @@ -208,7 +208,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_define */
typedef struct {
typedef struct {
zval val; /* zval used in define */
text *name; /* placeholder's name */
ub4 name_len; /* placeholder's name length */
Expand All @@ -217,7 +217,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_statement */
typedef struct {
typedef struct {
zend_resource *id;
zend_resource *parent_stmtid; /* parent statement id */
struct php_oci_statement *impres_child_stmt;/* child of current Implicit Result Set statement handle */
Expand All @@ -242,7 +242,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_bind */
typedef struct {
typedef struct {
OCIBind *bind; /* bind handle */
zval val; /* value */
dvoid *descriptor; /* used for binding of LOBS etc */
Expand All @@ -265,7 +265,7 @@ typedef struct {
/* }}} */

/* {{{ php_oci_out_column */
typedef struct {
typedef struct {
php_oci_statement *statement; /* statement handle. used when fetching REFCURSORS */
php_oci_statement *nested_statement; /* statement handle. used when fetching REFCURSORS */
OCIDefine *oci_define; /* define handle */
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/pcre2lib/pcre2.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.

#define PCRE2_MAJOR 10
#define PCRE2_MINOR 30
#define PCRE2_PRERELEASE
#define PCRE2_PRERELEASE
#define PCRE2_DATE 2017-08-14

/* When an application links to a PCRE DLL in Windows, the symbols that are
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo_firebird/php_pdo_firebird_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef void (*info_func_t)(char*);
#endif

#if defined(_LP64) || defined(__LP64__) || defined(__arch64__) || defined(_WIN64)
# define PDO_FIREBIRD_HANDLE_INITIALIZER 0U
# define PDO_FIREBIRD_HANDLE_INITIALIZER 0U
#else
# define PDO_FIREBIRD_HANDLE_INITIALIZER NULL
#endif
Expand Down
Loading