Remove use of register keyword in headers

Headers must be C++ compatible -- this throws warnings.

The register keyword is not used for optimization, at least not
in optimized builds.
This commit is contained in:
Nikita Popov 2016-02-04 13:31:21 +01:00
parent fbe50b15dd
commit af66ad2857
6 changed files with 11 additions and 11 deletions

View File

@ -248,7 +248,7 @@ END_EXTERN_C()
static zend_always_inline int _zend_handle_numeric_str(const char *key, size_t length, zend_ulong *idx)
{
register const char *tmp = key;
const char *tmp = key;
if (*tmp > '9') {
return 0;

View File

@ -185,7 +185,7 @@ zend_memnstr(const char *haystack, const char *needle, size_t needle_len, const
static zend_always_inline const void *zend_memrchr(const void *s, int c, size_t n)
{
register const unsigned char *e;
const unsigned char *e;
if (n <= 0) {
return NULL;
}

View File

@ -323,7 +323,7 @@ static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_str
static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len)
{
register zend_ulong hash = Z_UL(5381);
zend_ulong hash = Z_UL(5381);
/* variant with the hash unrolled eight times */
for (; len >= 8; len -= 8) {

View File

@ -93,7 +93,7 @@
smart_string_append_unsigned_ex((dest), (val), 0)
#define smart_string_appendc_ex(dest, ch, what) do { \
register size_t __nl; \
size_t __nl; \
smart_string_alloc4((dest), 1, (what), __nl); \
(dest)->len = __nl; \
((unsigned char *) (dest)->c)[(dest)->len - 1] = (ch); \
@ -109,7 +109,7 @@
} while (0)
#define smart_string_appendl_ex(dest, src, nlen, what) do { \
register size_t __nl; \
size_t __nl; \
smart_string *__dest = (smart_string *) (dest); \
\
smart_string_alloc4(__dest, (nlen), (what), __nl); \

View File

@ -330,7 +330,7 @@ END_EXTERN_C()
BEGIN_EXTERN_C()
PHPAPI extern int (*php_register_internal_extensions_func)(void);
PHPAPI int php_register_internal_extensions(void);
PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void *));
PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *));
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
PHPAPI void php_com_initialize(void);
PHPAPI char *php_get_current_user(void);

View File

@ -86,7 +86,7 @@ PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap);
PHPAPI int ap_php_asprintf(char **buf, const char *format, ...);
PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf);
PHPAPI char * php_conv_fp(register char format, register double num,
PHPAPI char * php_conv_fp(char format, double num,
boolean_e add_dp, int precision, char dec_point, bool_int * is_negative, char *buf, size_t *len);
END_EXTERN_C()
@ -153,11 +153,11 @@ typedef enum {
typedef WIDE_INT wide_int;
typedef unsigned WIDE_INT u_wide_int;
PHPAPI char * ap_php_conv_10(register wide_int num, register bool_int is_unsigned,
register bool_int * is_negative, char *buf_end, register size_t *len);
PHPAPI char * ap_php_conv_10(wide_int num, bool_int is_unsigned,
bool_int * is_negative, char *buf_end, size_t *len);
PHPAPI char * ap_php_conv_p2(register u_wide_int num, register int nbits,
char format, char *buf_end, register size_t *len);
PHPAPI char * ap_php_conv_p2(u_wide_int num, int nbits,
char format, char *buf_end, size_t *len);
/* The maximum precision that's allowed for float conversion. Does not include
* decimal separator, exponent, sign, terminator. Currently does not affect