Skip to content

Commit 2caa81b

Browse files
shivammathurgithub-actions[bot]
authored andcommitted
Remove use of register keyword in headers
1 parent b3e0039 commit 2caa81b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Zend/zend_hash.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
typedef ulong (*hash_func_t)(const char *arKey, uint nKeyLength);
4747
typedef int (*compare_func_t)(const void *, const void * TSRMLS_DC);
48-
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t TSRMLS_DC);
48+
typedef void (*sort_func_t)(void *, size_t, size_t, compare_func_t TSRMLS_DC);
4949
typedef void (*dtor_func_t)(void *pDest);
5050
typedef void (*copy_ctor_func_t)(void *pElement);
5151
typedef void (*copy_ctor_param_func_t)(void *pElement, void *pParam);
@@ -268,7 +268,7 @@ ZEND_API void _zend_hash_splice(HashTable *ht, uint nDataSize, copy_ctor_func_t
268268

269269
static inline ulong zend_inline_hash_func(const char *arKey, uint nKeyLength)
270270
{
271-
register ulong hash = 5381;
271+
ulong hash = 5381;
272272

273273
/* variant with the hash unrolled eight times */
274274
for (; nKeyLength >= 8; nKeyLength -= 8) {
@@ -313,7 +313,7 @@ END_EXTERN_C()
313313
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
314314

315315
#define ZEND_HANDLE_NUMERIC_EX(key, length, idx, func) do { \
316-
register const char *tmp = key; \
316+
const char *tmp = key; \
317317
\
318318
if (*tmp == '-') { \
319319
tmp++; \

Zend/zend_operators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ zend_memnstr(const char *haystack, const char *needle, int needle_len, char *end
305305

306306
static inline const void *zend_memrchr(const void *s, int c, size_t n)
307307
{
308-
register const unsigned char *e;
308+
const unsigned char *e;
309309

310310
if (n <= 0) {
311311
return NULL;

ext/standard/php_smart_str.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
smart_str_append_unsigned_ex((dest), (val), 0)
9999

100100
#define smart_str_appendc_ex(dest, ch, what) do { \
101-
register size_t __nl; \
101+
size_t __nl; \
102102
smart_str_alloc4((dest), 1, (what), __nl); \
103103
(dest)->len = __nl; \
104104
((unsigned char *) (dest)->c)[(dest)->len - 1] = (ch); \
@@ -114,7 +114,7 @@
114114
} while (0)
115115

116116
#define smart_str_appendl_ex(dest, src, nlen, what) do { \
117-
register size_t __nl; \
117+
size_t __nl; \
118118
smart_str *__dest = (smart_str *) (dest); \
119119
\
120120
smart_str_alloc4(__dest, (nlen), (what), __nl); \

main/php.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ END_EXTERN_C()
334334
BEGIN_EXTERN_C()
335335
PHPAPI extern int (*php_register_internal_extensions_func)(TSRMLS_D);
336336
PHPAPI int php_register_internal_extensions(TSRMLS_D);
337-
PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC);
337+
PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC);
338338
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
339339
PHPAPI void php_com_initialize(TSRMLS_D);
340340
PHPAPI char *php_get_current_user(TSRMLS_D);

main/snprintf.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap);
8686
PHPAPI int ap_php_asprintf(char **buf, const char *format, ...);
8787
PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
8888
PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf);
89-
PHPAPI char * php_conv_fp(register char format, register double num,
89+
PHPAPI char * php_conv_fp(char format, double num,
9090
boolean_e add_dp, int precision, char dec_point, bool_int * is_negative, char *buf, int *len);
9191

9292
END_EXTERN_C()
@@ -152,11 +152,11 @@ typedef enum {
152152
typedef WIDE_INT wide_int;
153153
typedef unsigned WIDE_INT u_wide_int;
154154

155-
PHPAPI char * ap_php_conv_10(register wide_int num, register bool_int is_unsigned,
156-
register bool_int * is_negative, char *buf_end, register int *len);
155+
PHPAPI char * ap_php_conv_10(wide_int num, bool_int is_unsigned,
156+
bool_int * is_negative, char *buf_end, int *len);
157157

158-
PHPAPI char * ap_php_conv_p2(register u_wide_int num, register int nbits,
159-
char format, char *buf_end, register int *len);
158+
PHPAPI char * ap_php_conv_p2(u_wide_int num, int nbits,
159+
char format, char *buf_end, int *len);
160160

161161
/* The maximum precision that's allowed for float conversion. Does not include
162162
* decimal separator, exponent, sign, terminator. Currently does not affect

0 commit comments

Comments
 (0)