@@ -2694,9 +2694,9 @@ PHP_METHOD(Redis, copy) {
26942694/* }}} */
26952695
26962696/* Helper to format any combination of SCAN arguments */
2697- PHP_REDIS_API int
2697+ static int
26982698redis_build_scan_cmd (char * * cmd ,REDIS_SCAN_TYPE type ,char * key ,int key_len ,
2699- long iter ,char * pattern ,int pattern_len ,int count ,
2699+ uint64_t cursor ,char * pattern ,int pattern_len ,int count ,
27002700zend_string * match_type )
27012701{
27022702smart_string cmdstr = {0 };
@@ -2727,7 +2727,7 @@ redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len,
27272727/* Start the command */
27282728redis_cmd_init_sstr (& cmdstr ,argc ,keyword ,strlen (keyword ));
27292729if (key_len )redis_cmd_append_sstr (& cmdstr ,key ,key_len );
2730- redis_cmd_append_sstr_long (& cmdstr ,iter );
2730+ redis_cmd_append_sstr_u64 (& cmdstr ,cursor );
27312731
27322732/* Append COUNT if we've got it */
27332733if (count ) {
@@ -2751,7 +2751,7 @@ redis_build_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len,
27512751return cmdstr .len ;
27522752}
27532753
2754- /* {{{ proto redis::scan(&$iterator , [pattern, [count, [type]]]) */
2754+ /* {{{ proto redis::scan(&$cursor , [pattern, [count, [type]]]) */
27552755PHP_REDIS_API void
27562756generic_scan_cmd (INTERNAL_FUNCTION_PARAMETERS ,REDIS_SCAN_TYPE type ) {
27572757zval * object ,* z_cursor ;
@@ -2818,7 +2818,7 @@ generic_scan_cmd(INTERNAL_FUNCTION_PARAMETERS, REDIS_SCAN_TYPE type) {
28182818 * pattern. phpredis can be set up to abstract this from the user, by
28192819 * setting OPT_SCAN to REDIS_SCAN_RETRY. Otherwise we will return empty
28202820 * keys and the user will need to make subsequent calls with an updated
2821- *iterator .
2821+ *cursor .
28222822 */
28232823do {
28242824/* Free our previous reply if we're back in the loop. We know we are
@@ -2829,10 +2829,10 @@ generic_scan_cmd(INTERNAL_FUNCTION_PARAMETERS, REDIS_SCAN_TYPE type) {
28292829 }
28302830
28312831// Format our SCAN command
2832- cmd_len = redis_build_scan_cmd (& cmd ,type ,key ,key_len ,( long ) cursor ,
2833- pattern ,pattern_len ,count ,match_type );
2832+ cmd_len = redis_build_scan_cmd (& cmd ,type ,key ,key_len ,cursor ,
2833+ pattern ,pattern_len ,count ,match_type );
28342834
2835- /* Execute our command getting our newiterator value */
2835+ /* Execute our command getting our newcursor value */
28362836REDIS_PROCESS_REQUEST (redis_sock ,cmd ,cmd_len );
28372837if (redis_sock_read_scan_reply (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
28382838redis_sock ,type ,& cursor )< 0 )
@@ -2853,7 +2853,7 @@ generic_scan_cmd(INTERNAL_FUNCTION_PARAMETERS, REDIS_SCAN_TYPE type) {
28532853/* Free our key if it was prefixed */
28542854if (key_free )efree (key );
28552855
2856- /* Update ouriterator reference */
2856+ /* Update ourcursor reference */
28572857redisSetScanCursor (z_cursor ,cursor );
28582858}
28592859