phpbook icon indicating copy to clipboard operation
phpbook copied to clipboard

8.2 章 sample_strvec_handler 例子错误

Open bupt1987 opened this issue 12 years ago • 0 comments

//填充数据
while (argc) {
    zval *value;
    MAKE_STD_ZVAL(value);
    ZVAL_STRING(value, argv[argc], 1);
    argv++;
    if (zend_hash_next_index_insert(ht, (void**)&value,
                        sizeof(zval*)) == FAILURE) {
        /* Silently skip failed additions */
        zval_ptr_dtor(&value);
    }
}

中的 argv++; 应该是 argc--; 吧?

bupt1987 avatar Nov 29 '13 09:11 bupt1987