Lines Matching refs:entry
72 browscap_entry *entry = Z_PTR_P(zvalue); local
73 zend_string_release_ex(entry->pattern, 0);
74 if (entry->parent) {
75 zend_string_release_ex(entry->parent, 0);
77 efree(entry);
82 browscap_entry *entry = Z_PTR_P(zvalue); in browscap_entry_dtor_persistent() local
83 zend_string_release_ex(entry->pattern, 1); in browscap_entry_dtor_persistent()
84 if (entry->parent) { in browscap_entry_dtor_persistent()
85 zend_string_release_ex(entry->parent, 1); in browscap_entry_dtor_persistent()
87 pefree(entry, 1); in browscap_entry_dtor_persistent()
271 static HashTable *browscap_entry_to_array(browser_data *bdata, browscap_entry *entry) { in browscap_entry_to_array() argument
277 ZVAL_STR(&tmp, browscap_convert_pattern(entry->pattern, 0)); in browscap_entry_to_array()
280 ZVAL_STR_COPY(&tmp, entry->pattern); in browscap_entry_to_array()
283 if (entry->parent) { in browscap_entry_to_array()
284 ZVAL_STR_COPY(&tmp, entry->parent); in browscap_entry_to_array()
288 for (i = entry->kv_start; i < entry->kv_end; i++) { in browscap_entry_to_array()
376 browscap_entry *entry; in php_browscap_parser_cb() local
396 entry = ctx->current_entry in php_browscap_parser_cb()
398 zend_hash_update_ptr(bdata->htab, pattern, entry); in php_browscap_parser_cb()
405 entry->pattern = zend_string_copy(pattern); in php_browscap_parser_cb()
406 entry->kv_end = entry->kv_start = bdata->kv_used; in php_browscap_parser_cb()
407 entry->parent = NULL; in php_browscap_parser_cb()
409 pos = entry->prefix_len = browscap_compute_prefix_len(pattern); in php_browscap_parser_cb()
412 &entry->contains_start[i], &entry->contains_len[i]); in php_browscap_parser_cb()
557 static inline size_t browscap_get_minimum_length(browscap_entry *entry) { in browscap_get_minimum_length() argument
558 size_t len = entry->prefix_len; in browscap_get_minimum_length()
561 len += entry->contains_len[i]; in browscap_get_minimum_length()
569 browscap_entry *entry = Z_PTR_P(entry_zv); in browser_reg_compare() local
584 if (ZSTR_LEN(agent_name) < browscap_get_minimum_length(entry)) { in browser_reg_compare()
590 ZSTR_VAL(agent_name), entry->prefix_len, in browser_reg_compare()
591 ZSTR_VAL(entry->pattern), entry->prefix_len) != 0) { in browser_reg_compare()
596 ZSTR_ALLOCA_ALLOC(pattern_lc, ZSTR_LEN(entry->pattern), use_heap); in browser_reg_compare()
597 zend_str_tolower_copy(ZSTR_VAL(pattern_lc), ZSTR_VAL(entry->pattern), ZSTR_LEN(entry->pattern)); in browser_reg_compare()
600 cur = ZSTR_VAL(agent_name) + entry->prefix_len; in browser_reg_compare()
602 if (entry->contains_len[i] != 0) { in browser_reg_compare()
604 ZSTR_VAL(pattern_lc) + entry->contains_start[i], in browser_reg_compare()
605 entry->contains_len[i], in browser_reg_compare()
611 cur += entry->contains_len[i]; in browser_reg_compare()
617 *found_entry_ptr = entry; in browser_reg_compare()
622 regex = browscap_convert_pattern(entry->pattern, 0); in browser_reg_compare()
645 zend_string *current_match = entry->pattern; in browser_reg_compare()
674 *found_entry_ptr = entry; in browser_reg_compare()
677 *found_entry_ptr = entry; in browser_reg_compare()