@@ -2629,7 +2629,7 @@ geoStoreType get_georadius_store_type(zend_string *key) {
2629
2629
}
2630
2630
2631
2631
/* Helper function to extract optional arguments for GEORADIUS and GEORADIUSBYMEMBER */
2632
- static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
2632
+ static int get_georadius_opts(HashTable *ht, geoOptions *opts TSRMLS_DC) {
2633
2633
ulong idx;
2634
2634
char *optstr;
2635
2635
zend_string *zkey;
@@ -2647,16 +2647,16 @@ static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
2647
2647
if (Z_TYPE_P(optval) != IS_LONG || Z_LVAL_P(optval) <= 0) {
2648
2648
php_error_docref(NULL TSRMLS_CC, E_WARNING,
2649
2649
"COUNT must be an integer > 0!");
2650
- if (o ->key) zend_string_release(o ->key);
2650
+ if (opts ->key) zend_string_release(opts ->key);
2651
2651
return FAILURE;
2652
2652
}
2653
2653
2654
2654
/* Set our count */
2655
- o ->count = Z_LVAL_P(optval);
2656
- } else if (o ->store == STORE_NONE) {
2657
- o ->store = get_georadius_store_type(zkey);
2658
- if (o ->store != STORE_NONE) {
2659
- o ->key = zval_get_string(optval);
2655
+ opts ->count = Z_LVAL_P(optval);
2656
+ } else if (opts ->store == STORE_NONE) {
2657
+ opts ->store = get_georadius_store_type(zkey);
2658
+ if (opts ->store != STORE_NONE) {
2659
+ opts ->key = zval_get_string(optval);
2660
2660
}
2661
2661
}
2662
2662
} else {
@@ -2666,25 +2666,25 @@ static int get_georadius_opts(HashTable *ht, geoOptions *o TSRMLS_DC) {
2666
2666
optstr = Z_STRVAL_P(optval);
2667
2667
2668
2668
if (!strcasecmp(optstr, "withcoord")) {
2669
- o ->withcoord = 1;
2669
+ opts ->withcoord = 1;
2670
2670
} else if (!strcasecmp(optstr, "withdist")) {
2671
- o ->withdist = 1;
2671
+ opts ->withdist = 1;
2672
2672
} else if (!strcasecmp(optstr, "withhash")) {
2673
- o ->withhash = 1;
2673
+ opts ->withhash = 1;
2674
2674
} else if (!strcasecmp(optstr, "asc")) {
2675
- o ->sort = SORT_ASC;
2675
+ opts ->sort = SORT_ASC;
2676
2676
} else if (!strcasecmp(optstr, "desc")) {
2677
- o ->sort = SORT_DESC;
2677
+ opts ->sort = SORT_DESC;
2678
2678
}
2679
2679
}
2680
2680
} ZEND_HASH_FOREACH_END();
2681
2681
2682
2682
/* STORE and STOREDIST are not compatible with the WITH* options */
2683
- if (o ->key != NULL && (o ->withcoord || o ->withdist || o ->withhash)) {
2683
+ if (opts ->key != NULL && (opts ->withcoord || opts ->withdist || opts ->withhash)) {
2684
2684
php_error_docref(NULL TSRMLS_CC, E_WARNING,
2685
2685
"STORE[DIST] is not compatible with WITHCOORD, WITHDIST or WITHHASH");
2686
2686
2687
- if (o ->key) zend_string_release(o ->key);
2687
+ if (opts ->key) zend_string_release(opts ->key);
2688
2688
return FAILURE;
2689
2689
}
2690
2690
0 commit comments