Skip to content

Commit 0afae28

Browse files
committed
[PHP 7.4] replace uint-uint32_t, ulong-zend_ulong
1 parent c3c5b2c commit 0afae28

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

oauth.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ int oauth_http_build_query(php_so_object *soo, smart_string *s, HashTable *args,
416416
zval *cur_val;
417417
zend_string *cur_key, *arg_key, *param_value;
418418
int numargs = 0, hash_key_type, skip_append = 0, i, found;
419-
ulong num_index;
419+
zend_ulong num_index;
420420
HashPosition pos;
421421
smart_string keyname;
422422

@@ -717,7 +717,7 @@ void oauth_add_signature_header(HashTable *request_headers, HashTable *oauth_arg
717717
zval *curval;
718718
zend_string *param_name, *param_val;
719719
zend_string *cur_key;
720-
ulong num_key;
720+
zend_ulong num_key;
721721
HashPosition pos;
722722

723723
smart_string_appends(&sheader, "OAuth ");
@@ -806,7 +806,7 @@ static long make_req_streams(php_so_object *soo, const char *url, const smart_st
806806
HashPosition pos;
807807
zval *cur_val, zheaders;
808808
zend_string *cur_key;
809-
ulong num_key;
809+
zend_ulong num_key;
810810
smart_string sheaders = {0};
811811
int first = 1;
812812

@@ -945,7 +945,7 @@ static long make_req_streams(php_so_object *soo, const char *url, const smart_st
945945
#if OAUTH_USE_CURL
946946
static size_t soo_read_response(char *ptr, size_t size, size_t nmemb, void *ctx) /* {{{ */
947947
{
948-
uint relsize;
948+
size_t relsize;
949949
php_so_object *soo = (php_so_object *)ctx;
950950

951951
relsize = size * nmemb;
@@ -1044,8 +1044,8 @@ long make_req_curl(php_so_object *soo, const char *url, const smart_string *payl
10441044
double d_code;
10451045
zval info, *zca_info, *zca_path, *cur_val;
10461046
char *s_code, *content_type = NULL, *bufz = NULL;
1047-
uint sslcheck;
1048-
ulong num_key;
1047+
uit32_t sslcheck;
1048+
zend_ulong num_key;
10491049
smart_string sheader = {0};
10501050
zend_string *cur_key;
10511051
HashPosition pos;
@@ -1412,7 +1412,7 @@ static long oauth_fetch(php_so_object *soo, const char *url, const char *method,
14121412
HashTable *rargs = NULL, *rheaders = NULL;
14131413
long http_response_code, auth_type;
14141414
smart_string surl = {0}, payload = {0}, postdata = {0};
1415-
uint is_redirect = FALSE, follow_redirects = 0, need_to_free_rheaders = 0;
1415+
uit32_t is_redirect = FALSE, follow_redirects = 0, need_to_free_rheaders = 0;
14161416

14171417
auth_type = Z_LVAL_P(soo_get_property(soo, OAUTH_ATTR_AUTHMETHOD));
14181418
if(fetch_flags & OAUTH_OVERRIDE_HTTP_METHOD) {

php_oauth.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ typedef struct {
216216
smart_string headers_in;
217217
smart_string headers_out;
218218
char last_location_header[OAUTH_MAX_HEADER_LEN];
219-
uint redirects;
220-
uint multipart_files_num;
221-
uint sslcheck; /* whether we check for SSL verification or not */
222-
uint debug; /* verbose output */
223-
uint follow_redirects; /* follow and sign redirects? */
224-
uint reqengine; /* streams or curl */
219+
uit32_t redirects;
220+
uit32_t multipart_files_num;
221+
uit32_t sslcheck; /* whether we check for SSL verification or not */
222+
uit32_t debug; /* verbose output */
223+
uit32_t follow_redirects; /* follow and sign redirects? */
224+
uit32_t reqengine; /* streams or curl */
225225
long timeout; /* timeout in milliseconds */
226226
char *nonce;
227227
char *timestamp;
@@ -232,7 +232,7 @@ typedef struct {
232232
php_so_debug *debug_info;
233233
char **multipart_files;
234234
char **multipart_params;
235-
uint is_multipart;
235+
uit32_t is_multipart;
236236
void ***thread_ctx;
237237
zend_object zo;
238238
} php_so_object;

provider.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static int oauth_provider_remove_required_param(HashTable *ht, char *required_pa
5858
{
5959
zval *dest_entry;
6060
zend_string *key;
61-
ulong num_key;
61+
zend_ulong num_key;
6262
HashPosition hpos;
6363

6464
if((dest_entry = zend_hash_str_find(ht, required_param, strlen(required_param))) == NULL) {
@@ -97,7 +97,7 @@ static void oauth_provider_apply_custom_param(HashTable *ht, HashTable *custom)
9797
HashPosition custompos;
9898
zval *entry;
9999
zend_string *key;
100-
ulong num_key;
100+
zend_ulong num_key;
101101

102102
zend_hash_internal_pointer_reset_ex(custom, &custompos);
103103
do {
@@ -156,7 +156,7 @@ static void oauth_provider_check_required_params(HashTable *required_params, Has
156156
HashPosition hpos, reqhpos, paramhpos;
157157
zval *dest_entry, param;
158158
zend_string *key;
159-
ulong num_key;
159+
zend_ulong num_key;
160160

161161
zend_hash_internal_pointer_reset_ex(required_params, &hpos);
162162
zend_hash_internal_pointer_reset_ex(params, &reqhpos);
@@ -451,7 +451,7 @@ SOP_METHOD(__construct)
451451
zval *params = NULL, *pthis = NULL, apache_get_headers, retval, *tmpzval, *item_param;
452452
char *authorization_header = NULL;
453453
zend_string *key;
454-
ulong num_key = 0, param_count = 0;
454+
zend_ulong num_key = 0, param_count = 0;
455455
HashPosition hpos;
456456

457457
pthis = getThis();
@@ -662,7 +662,7 @@ SOP_METHOD(checkOAuthRequest)
662662
zval *retval = NULL, *param, *pthis, *token_secret = NULL, *consumer_secret, *req_signature, *sig_method = NULL, rv;
663663
oauth_sig_context *sig_ctx = NULL;
664664
php_oauth_provider *sop;
665-
ulong missing_param_count = 0, mp_count = 1;
665+
zend_ulong missing_param_count = 0, mp_count = 1;
666666
char additional_info[512] = "", *http_verb = NULL, *uri = NULL, *current_uri = NULL;
667667
zend_string *sbs, *signature = NULL;
668668
HashPosition hpos;
@@ -974,8 +974,8 @@ SOP_METHOD(reportProblem)
974974
zend_bool out_malloced = 0;
975975
char *out, *tmp_out, *http_header_line;
976976
size_t pr_len;
977-
ulong lcode;
978-
uint http_code;
977+
zend_ulong lcode;
978+
uit32_t http_code;
979979
sapi_header_line ctr = {0};
980980
zend_bool send_headers = 1;
981981

0 commit comments

Comments
 (0)