projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
cd2f5af
)
PHP 7.4: ulong->unsigned long, uint->uint32_t
author
Jan-E
<github@ehrhardt.nl>
Thu, 24 Oct 2019 10:46:50 +0000
(12:46 +0200)
committer
Jan-E
<github@ehrhardt.nl>
Thu, 24 Oct 2019 10:46:50 +0000
(12:46 +0200)
src/php_http_client_curl.c
patch
|
blob
|
history
src/php_http_curl.c
patch
|
blob
|
history
src/php_http_encoding.c
patch
|
blob
|
history
src/php_http_etag.c
patch
|
blob
|
history
src/php_http_filter.c
patch
|
blob
|
history
src/php_http_message_parser.c
patch
|
blob
|
history
src/php_http_options.c
patch
|
blob
|
history
src/php_http_options.h
patch
|
blob
|
history
src/php_http_querystring.c
patch
|
blob
|
history
diff --git
a/src/php_http_client_curl.c
b/src/php_http_client_curl.c
index 45515fa2686316497d184982fe76d95521eca955..94cdf474180549023805549a22230d02e20b3b4b 100644
(file)
--- a/
src/php_http_client_curl.c
+++ b/
src/php_http_client_curl.c
@@
-46,7
+46,7
@@
typedef struct php_http_client_curl_handler {
php_http_buffer_t ranges;
struct {
php_http_buffer_t ranges;
struct {
- uint count;
+ uint
32_t
count;
double delay;
} retry;
double delay;
} retry;
diff --git
a/src/php_http_curl.c
b/src/php_http_curl.c
index 5c026a6de4b89195f91a1706018ef02421abc5de..63bc104f2a58f0ae2b05c5edcd1e905e87d77802 100644
(file)
--- a/
src/php_http_curl.c
+++ b/
src/php_http_curl.c
@@
-43,9
+43,9
@@
static void php_http_openssl_thread_lock(int mode, int n, const char * file, int
}
}
}
}
-static ulong php_http_openssl_thread_id(void)
+static u
nsigned
long php_http_openssl_thread_id(void)
{
{
- return (ulong) tsrm_thread_id();
+ return (u
nsigned
long) tsrm_thread_id();
}
#endif
#if PHP_HTTP_NEED_GNUTLS_TSL
}
#endif
#if PHP_HTTP_NEED_GNUTLS_TSL
diff --git
a/src/php_http_encoding.c
b/src/php_http_encoding.c
index 4e25de30a73a160cb6864908b94744c6c180bdc3..3e57e2932e53233c99fa7fd408b724c4604a4f31 100644
(file)
--- a/
src/php_http_encoding.c
+++ b/
src/php_http_encoding.c
@@
-36,7
+36,7
@@
const char *php_http_encoding_dechunk(const char *encoded, size_t encoded_len, c
*decoded = ecalloc(1, encoded_len + 1);
while ((encoded + encoded_len - e_ptr) > 0) {
*decoded = ecalloc(1, encoded_len + 1);
while ((encoded + encoded_len - e_ptr) > 0) {
- ulong chunk_len = 0, rest;
+ u
nsigned
long chunk_len = 0, rest;
chunk_len = strtoul(e_ptr, &n_ptr, 16);
chunk_len = strtoul(e_ptr, &n_ptr, 16);
@@
-237,7
+237,7
@@
void php_http_encoding_stream_free(php_http_encoding_stream_t **s)
struct dechunk_ctx {
php_http_buffer_t buffer;
struct dechunk_ctx {
php_http_buffer_t buffer;
- ulong hexlen;
+ u
nsigned
long hexlen;
unsigned zeroed:1;
};
unsigned zeroed:1;
};
diff --git
a/src/php_http_etag.c
b/src/php_http_etag.c
index 1430cfa1c6726dec7b6b2f3264fa4cf0abf0012c..048af87c8b63a60fd881a0cb319b3637f64f6549 100644
(file)
--- a/
src/php_http_etag.c
+++ b/
src/php_http_etag.c
@@
-26,8
+26,8
@@
php_http_etag_t *php_http_etag_init(const char *mode)
php_http_etag_t *e;
if (mode && (!strcasecmp(mode, "crc32b"))) {
php_http_etag_t *e;
if (mode && (!strcasecmp(mode, "crc32b"))) {
- ctx = emalloc(sizeof(uint));
- *((uint *) ctx) = ~0;
+ ctx = emalloc(sizeof(uint
32_t
));
+ *((uint
32_t
*) ctx) = ~0;
} else if (mode && !strcasecmp(mode, "sha1")) {
PHP_SHA1Init(ctx = emalloc(sizeof(PHP_SHA1_CTX)));
} else if (mode && !strcasecmp(mode, "md5")) {
} else if (mode && !strcasecmp(mode, "sha1")) {
PHP_SHA1Init(ctx = emalloc(sizeof(PHP_SHA1_CTX)));
} else if (mode && !strcasecmp(mode, "md5")) {
@@
-57,7
+57,7
@@
char *php_http_etag_finish(php_http_etag_t *e)
char *etag = NULL;
if (!strcasecmp(e->mode, "crc32b")) {
char *etag = NULL;
if (!strcasecmp(e->mode, "crc32b")) {
- uint e_ctx;
+ uint
32_t
e_ctx;
memcpy(&e_ctx, e->ctx, 4);
e_ctx = ntohl(~e_ctx);
etag = php_http_etag_digest((unsigned char *) &e_ctx, 4);
memcpy(&e_ctx, e->ctx, 4);
e_ctx = ntohl(~e_ctx);
etag = php_http_etag_digest((unsigned char *) &e_ctx, 4);
@@
-88,11
+88,11
@@
char *php_http_etag_finish(php_http_etag_t *e)
size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t data_len)
{
if (!strcasecmp(e->mode, "crc32b")) {
size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t data_len)
{
if (!strcasecmp(e->mode, "crc32b")) {
- uint
i, c = *((uin
t *) e->ctx);
+ uint
32_t i, c = *((uint32_
t *) e->ctx);
for (i = 0; i < data_len; ++i) {
CRC32(c, data_ptr[i]);
}
for (i = 0; i < data_len; ++i) {
CRC32(c, data_ptr[i]);
}
- *((uint *) e->ctx) = c;
+ *((uint
32_t
*) e->ctx) = c;
} else if ((!strcasecmp(e->mode, "sha1"))) {
PHP_SHA1Update(e->ctx, (const unsigned char *) data_ptr, data_len);
} else if ((!strcasecmp(e->mode, "md5"))) {
} else if ((!strcasecmp(e->mode, "sha1"))) {
PHP_SHA1Update(e->ctx, (const unsigned char *) data_ptr, data_len);
} else if ((!strcasecmp(e->mode, "md5"))) {
diff --git
a/src/php_http_filter.c
b/src/php_http_filter.c
index 95ff5601e37323acd6c3b840a971e881f38f5464..52d2b03f584774f931369028cba53d00de8c3987 100644
(file)
--- a/
src/php_http_filter.c
+++ b/
src/php_http_filter.c
@@
-72,7
+72,7
@@
PHP_MINIT_FUNCTION(http_filter)
typedef struct _http_chunked_decode_filter_buffer_t {
php_http_buffer_t buffer;
typedef struct _http_chunked_decode_filter_buffer_t {
php_http_buffer_t buffer;
- ulong hexlen;
+ u
nsigned
long hexlen;
} PHP_HTTP_FILTER_BUFFER(chunked_decode);
typedef php_http_encoding_stream_t PHP_HTTP_FILTER_BUFFER(stream);
} PHP_HTTP_FILTER_BUFFER(chunked_decode);
typedef php_http_encoding_stream_t PHP_HTTP_FILTER_BUFFER(stream);
diff --git
a/src/php_http_message_parser.c
b/src/php_http_message_parser.c
index 49a6013ae561d9b0bcec0cc4e52fc55172d7f4b2..517806d12cf139bee4db2e8046a485a138bfbe2f 100644
(file)
--- a/
src/php_http_message_parser.c
+++ b/
src/php_http_message_parser.c
@@
-323,7
+323,7
@@
php_http_message_parser_state_t php_http_message_parser_parse(php_http_message_p
}
if (content_range) {
}
if (content_range) {
- ulong total = 0, start = 0, end = 0;
+ u
nsigned
long total = 0, start = 0, end = 0;
if (!strncasecmp(content_range->val, "bytes", lenof("bytes"))
&& ( content_range->val[lenof("bytes")] == ':'
if (!strncasecmp(content_range->val, "bytes", lenof("bytes"))
&& ( content_range->val[lenof("bytes")] == ':'
diff --git
a/src/php_http_options.c
b/src/php_http_options.c
index 4cb6ed37b648cabf62d305024427ece77796f9ba..65a27afd27abcd57d291de8ecb69ead8aeed2d6f 100644
(file)
--- a/
src/php_http_options.c
+++ b/
src/php_http_options.c
@@
-74,7
+74,7
@@
void php_http_options_free(php_http_options_t **registry)
}
}
}
}
-php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, ulong option, zend_uchar type)
+php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, u
nsigned
long option, zend_uchar type)
{
php_http_option_t opt;
{
php_http_option_t opt;
diff --git
a/src/php_http_options.h
b/src/php_http_options.h
index 4fff611a3b40aadfeac1c5d210894b369a9ec0dd..fd72ebd0eb5da31fa6a1a998d1acc1ecb41852f9 100644
(file)
--- a/
src/php_http_options.h
+++ b/
src/php_http_options.h
@@
-32,7
+32,7
@@
struct php_http_option {
php_http_options_t suboptions;
zend_string *name;
php_http_options_t suboptions;
zend_string *name;
- ulong option;
+ u
nsigned
long option;
zend_uchar type;
unsigned flags;
zval defval;
zend_uchar type;
unsigned flags;
zval defval;
@@
-46,7
+46,7
@@
PHP_HTTP_API ZEND_RESULT_CODE php_http_options_apply(php_http_options_t *registr
PHP_HTTP_API void php_http_options_dtor(php_http_options_t *registry);
PHP_HTTP_API void php_http_options_free(php_http_options_t **registry);
PHP_HTTP_API void php_http_options_dtor(php_http_options_t *registry);
PHP_HTTP_API void php_http_options_free(php_http_options_t **registry);
-PHP_HTTP_API php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, ulong option, zend_uchar type);
+PHP_HTTP_API php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, u
nsigned
long option, zend_uchar type);
PHP_HTTP_API zval *php_http_option_get(php_http_option_t *opt, HashTable *options, void *userdata);
#endif /* PHP_HTTP_OPTIONS_H */
PHP_HTTP_API zval *php_http_option_get(php_http_option_t *opt, HashTable *options, void *userdata);
#endif /* PHP_HTTP_OPTIONS_H */
diff --git
a/src/php_http_querystring.c
b/src/php_http_querystring.c
index bd3afe5a054b9e9b085ebfa0cdfc9d91822d63e3..391bccf675f0534d36f079b2bb75b892a1434f9c 100644
(file)
--- a/
src/php_http_querystring.c
+++ b/
src/php_http_querystring.c
@@
-63,7
+63,7
@@
static inline void php_http_querystring_str(zval *instance, zval *return_value)
}
}
}
}
-static inline void php_http_querystring_get(zval *instance, int type, char *name, uint name_len, zval *defval, zend_bool del, zval *return_value)
+static inline void php_http_querystring_get(zval *instance, int type, char *name, uint
32_t
name_len, zval *defval, zend_bool del, zval *return_value)
{
zval *arrval, qarray_tmp, *qarray = zend_read_property(php_http_querystring_class_entry, instance, ZEND_STRL("queryArray"), 0, &qarray_tmp);
{
zval *arrval, qarray_tmp, *qarray = zend_read_property(php_http_querystring_class_entry, instance, ZEND_STRL("queryArray"), 0, &qarray_tmp);