Lines Matching refs:mydata
450 if (mydata) {\
451 phar_destroy_phar_data(mydata);\
734 phar_archive_data *mydata = NULL; in phar_parse_pharfile() local
1091 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_pharfile()
1092 mydata->is_persistent = PHAR_G(persist); in phar_parse_pharfile()
1093 HT_INVALIDATE(&mydata->manifest); in phar_parse_pharfile()
1094 HT_INVALIDATE(&mydata->mounted_dirs); in phar_parse_pharfile()
1095 HT_INVALIDATE(&mydata->virtual_dirs); in phar_parse_pharfile()
1099 if (mydata->is_persistent) { in phar_parse_pharfile()
1109 phar_parse_metadata_lazy(buffer, &mydata->metadata_tracker, len, mydata->is_persistent); in phar_parse_pharfile()
1113 zend_hash_init(&mydata->manifest, manifest_count, in phar_parse_pharfile()
1114 zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); in phar_parse_pharfile()
1115 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_pharfile()
1116 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1117 zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, in phar_parse_pharfile()
1118 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1119 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1121 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_pharfile()
1123 mydata->fname_len = fname_len; in phar_parse_pharfile()
1126 entry.phar = mydata; in phar_parse_pharfile()
1128 entry.is_persistent = mydata->is_persistent; in phar_parse_pharfile()
1155 phar_add_virtual_dirs(mydata, buffer, entry.filename_len); in phar_parse_pharfile()
1162 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1163 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1165 if (mydata->min_timestamp > entry.timestamp) { in phar_parse_pharfile()
1166 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1167 } else if (mydata->max_timestamp < entry.timestamp) { in phar_parse_pharfile()
1168 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1224 if (mydata->is_persistent) { in phar_parse_pharfile()
1229 zend_hash_add_mem(&mydata->manifest, str, (void*)&entry, sizeof(phar_entry_info)); in phar_parse_pharfile()
1233 …snprintf(mydata->version, sizeof(mydata->version), "%u.%u.%u", manifest_ver >> 12, (manifest_ver >… in phar_parse_pharfile()
1234 mydata->internal_file_start = halt_offset + manifest_len + 4; in phar_parse_pharfile()
1235 mydata->halt_offset = halt_offset; in phar_parse_pharfile()
1236 mydata->flags = manifest_flags; in phar_parse_pharfile()
1237 endbuffer = strrchr(mydata->fname, '/'); in phar_parse_pharfile()
1240 mydata->ext = memchr(endbuffer, '.', (mydata->fname + fname_len) - endbuffer); in phar_parse_pharfile()
1241 if (mydata->ext == endbuffer) { in phar_parse_pharfile()
1242 mydata->ext = memchr(endbuffer + 1, '.', (mydata->fname + fname_len) - endbuffer - 1); in phar_parse_pharfile()
1244 if (mydata->ext) { in phar_parse_pharfile()
1245 mydata->ext_len = (mydata->fname + mydata->fname_len) - mydata->ext; in phar_parse_pharfile()
1249 mydata->alias = alias ? in phar_parse_pharfile()
1250 pestrndup(alias, alias_len, mydata->is_persistent) : in phar_parse_pharfile()
1251 pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1252 mydata->alias_len = alias ? alias_len : fname_len; in phar_parse_pharfile()
1253 mydata->sig_flags = sig_flags; in phar_parse_pharfile()
1254 mydata->fp = fp; in phar_parse_pharfile()
1255 mydata->sig_len = sig_len; in phar_parse_pharfile()
1256 mydata->signature = signature; in phar_parse_pharfile()
1262 mydata->is_temporary_alias = temp_alias; in phar_parse_pharfile()
1264 if (!phar_validate_alias(mydata->alias, mydata->alias_len)) { in phar_parse_pharfile()
1278 if (mydata->is_persistent) { in phar_parse_pharfile()
1283 zend_hash_add_ptr(&(PHAR_G(phar_alias_map)), str, mydata); in phar_parse_pharfile()
1286 mydata->is_temporary_alias = 1; in phar_parse_pharfile()
1289 if (mydata->is_persistent) { in phar_parse_pharfile()
1290 str = zend_string_init_interned(mydata->fname, fname_len, 1); in phar_parse_pharfile()
1292 str = zend_string_init(mydata->fname, fname_len, 0); in phar_parse_pharfile()
1294 zend_hash_add_ptr(&(PHAR_G(phar_fname_map)), str, mydata); in phar_parse_pharfile()
1299 *pphar = mydata; in phar_parse_pharfile()
1388 phar_archive_data *mydata; in phar_create_or_parse_filename() local
1394 pphar = &mydata; in phar_create_or_parse_filename()
1440 mydata = ecalloc(1, sizeof(phar_archive_data)); in phar_create_or_parse_filename()
1441 mydata->fname = expand_filepath(fname, NULL); in phar_create_or_parse_filename()
1442 if (mydata->fname == NULL) { in phar_create_or_parse_filename()
1443 efree(mydata); in phar_create_or_parse_filename()
1446 fname_len = strlen(mydata->fname); in phar_create_or_parse_filename()
1448 phar_unixify_path_separators(mydata->fname, fname_len); in phar_create_or_parse_filename()
1450 p = strrchr(mydata->fname, '/'); in phar_create_or_parse_filename()
1453 mydata->ext = memchr(p, '.', (mydata->fname + fname_len) - p); in phar_create_or_parse_filename()
1454 if (mydata->ext == p) { in phar_create_or_parse_filename()
1455 mydata->ext = memchr(p + 1, '.', (mydata->fname + fname_len) - p - 1); in phar_create_or_parse_filename()
1457 if (mydata->ext) { in phar_create_or_parse_filename()
1458 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_create_or_parse_filename()
1463 *pphar = mydata; in phar_create_or_parse_filename()
1466 zend_hash_init(&mydata->manifest, sizeof(phar_entry_info), in phar_create_or_parse_filename()
1468 zend_hash_init(&mydata->mounted_dirs, sizeof(char *), in phar_create_or_parse_filename()
1470 zend_hash_init(&mydata->virtual_dirs, sizeof(char *), in phar_create_or_parse_filename()
1471 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_create_or_parse_filename()
1472 mydata->fname_len = fname_len; in phar_create_or_parse_filename()
1473 snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); in phar_create_or_parse_filename()
1474 mydata->is_temporary_alias = alias ? 0 : 1; in phar_create_or_parse_filename()
1475 mydata->internal_file_start = -1; in phar_create_or_parse_filename()
1476 mydata->fp = NULL; in phar_create_or_parse_filename()
1477 mydata->is_writeable = 1; in phar_create_or_parse_filename()
1478 mydata->is_brandnew = 1; in phar_create_or_parse_filename()
1480 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_create_or_parse_filename()
1485 mydata->is_data = 1; in phar_create_or_parse_filename()
1487 mydata->is_tar = 1; in phar_create_or_parse_filename()
1494 …har \"%s\" cannot set alias \"%s\", already in use by another phar archive", mydata->fname, alias); in phar_create_or_parse_filename()
1497 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1507 mydata->alias = alias ? estrndup(alias, alias_len) : estrndup(mydata->fname, fname_len); in phar_create_or_parse_filename()
1508 mydata->alias_len = alias ? alias_len : fname_len; in phar_create_or_parse_filename()
1512 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) { in phar_create_or_parse_filename()
1519 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()