Lines Matching refs:mydata

452 	if (mydata) {\
453 phar_destroy_phar_data(mydata);\
736 phar_archive_data *mydata = NULL; in phar_parse_pharfile() local
1093 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_pharfile()
1094 mydata->is_persistent = PHAR_G(persist); in phar_parse_pharfile()
1095 HT_INVALIDATE(&mydata->manifest); in phar_parse_pharfile()
1096 HT_INVALIDATE(&mydata->mounted_dirs); in phar_parse_pharfile()
1097 HT_INVALIDATE(&mydata->virtual_dirs); in phar_parse_pharfile()
1101 if (mydata->is_persistent) { in phar_parse_pharfile()
1111 phar_parse_metadata_lazy(buffer, &mydata->metadata_tracker, len, mydata->is_persistent); in phar_parse_pharfile()
1115 zend_hash_init(&mydata->manifest, manifest_count, in phar_parse_pharfile()
1116 zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); in phar_parse_pharfile()
1117 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_pharfile()
1118 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1119 zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, in phar_parse_pharfile()
1120 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1121 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1123 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_pharfile()
1125 mydata->fname_len = fname_len; in phar_parse_pharfile()
1128 entry.phar = mydata; in phar_parse_pharfile()
1130 entry.is_persistent = mydata->is_persistent; in phar_parse_pharfile()
1157 phar_add_virtual_dirs(mydata, buffer, entry.filename_len); in phar_parse_pharfile()
1164 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1165 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1167 if (mydata->min_timestamp > entry.timestamp) { in phar_parse_pharfile()
1168 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1169 } else if (mydata->max_timestamp < entry.timestamp) { in phar_parse_pharfile()
1170 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1226 if (mydata->is_persistent) { in phar_parse_pharfile()
1231 zend_hash_add_mem(&mydata->manifest, str, (void*)&entry, sizeof(phar_entry_info)); in phar_parse_pharfile()
1235 …snprintf(mydata->version, sizeof(mydata->version), "%u.%u.%u", manifest_ver >> 12, (manifest_ver >… in phar_parse_pharfile()
1236 mydata->halt_offset = halt_offset; in phar_parse_pharfile()
1237 mydata->flags = manifest_flags; in phar_parse_pharfile()
1238 endbuffer = strrchr(mydata->fname, '/'); in phar_parse_pharfile()
1241 mydata->ext = memchr(endbuffer, '.', (mydata->fname + fname_len) - endbuffer); in phar_parse_pharfile()
1242 if (mydata->ext == endbuffer) { in phar_parse_pharfile()
1243 mydata->ext = memchr(endbuffer + 1, '.', (mydata->fname + fname_len) - endbuffer - 1); in phar_parse_pharfile()
1245 if (mydata->ext) { in phar_parse_pharfile()
1246 mydata->ext_len = (mydata->fname + mydata->fname_len) - mydata->ext; in phar_parse_pharfile()
1250 mydata->alias = alias ? in phar_parse_pharfile()
1251 pestrndup(alias, alias_len, mydata->is_persistent) : in phar_parse_pharfile()
1252 pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1253 mydata->alias_len = alias ? alias_len : fname_len; in phar_parse_pharfile()
1254 mydata->sig_flags = sig_flags; in phar_parse_pharfile()
1255 mydata->fp = fp; in phar_parse_pharfile()
1256 mydata->sig_len = sig_len; in phar_parse_pharfile()
1257 mydata->signature = signature; in phar_parse_pharfile()
1263 mydata->is_temporary_alias = temp_alias; in phar_parse_pharfile()
1265 if (!phar_validate_alias(mydata->alias, mydata->alias_len)) { in phar_parse_pharfile()
1279 if (mydata->is_persistent) { in phar_parse_pharfile()
1284 zend_hash_add_ptr(&(PHAR_G(phar_alias_map)), str, mydata); in phar_parse_pharfile()
1287 mydata->is_temporary_alias = 1; in phar_parse_pharfile()
1290 if (mydata->is_persistent) { in phar_parse_pharfile()
1291 str = zend_string_init_interned(mydata->fname, fname_len, 1); in phar_parse_pharfile()
1293 str = zend_string_init(mydata->fname, fname_len, 0); in phar_parse_pharfile()
1295 zend_hash_add_ptr(&(PHAR_G(phar_fname_map)), str, mydata); in phar_parse_pharfile()
1300 *pphar = mydata; in phar_parse_pharfile()
1391 phar_archive_data *mydata; in phar_create_or_parse_filename() local
1397 pphar = &mydata; in phar_create_or_parse_filename()
1443 mydata = ecalloc(1, sizeof(phar_archive_data)); in phar_create_or_parse_filename()
1444 mydata->fname = expand_filepath(fname, NULL); in phar_create_or_parse_filename()
1445 if (mydata->fname == NULL) { in phar_create_or_parse_filename()
1446 efree(mydata); in phar_create_or_parse_filename()
1449 fname_len = strlen(mydata->fname); in phar_create_or_parse_filename()
1451 phar_unixify_path_separators(mydata->fname, fname_len); in phar_create_or_parse_filename()
1453 p = strrchr(mydata->fname, '/'); in phar_create_or_parse_filename()
1456 mydata->ext = memchr(p, '.', (mydata->fname + fname_len) - p); in phar_create_or_parse_filename()
1457 if (mydata->ext == p) { in phar_create_or_parse_filename()
1458 mydata->ext = memchr(p + 1, '.', (mydata->fname + fname_len) - p - 1); in phar_create_or_parse_filename()
1460 if (mydata->ext) { in phar_create_or_parse_filename()
1461 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_create_or_parse_filename()
1466 *pphar = mydata; in phar_create_or_parse_filename()
1469 zend_hash_init(&mydata->manifest, sizeof(phar_entry_info), in phar_create_or_parse_filename()
1471 zend_hash_init(&mydata->mounted_dirs, sizeof(char *), in phar_create_or_parse_filename()
1473 zend_hash_init(&mydata->virtual_dirs, sizeof(char *), in phar_create_or_parse_filename()
1474 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_create_or_parse_filename()
1475 mydata->fname_len = fname_len; in phar_create_or_parse_filename()
1476 snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); in phar_create_or_parse_filename()
1477 mydata->is_temporary_alias = alias ? 0 : 1; in phar_create_or_parse_filename()
1478 mydata->fp = NULL; in phar_create_or_parse_filename()
1479 mydata->is_writeable = 1; in phar_create_or_parse_filename()
1480 mydata->is_brandnew = 1; in phar_create_or_parse_filename()
1482 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_create_or_parse_filename()
1487 mydata->is_data = 1; in phar_create_or_parse_filename()
1489 mydata->is_tar = 1; in phar_create_or_parse_filename()
1496 …har \"%s\" cannot set alias \"%s\", already in use by another phar archive", mydata->fname, alias); in phar_create_or_parse_filename()
1499 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1509 mydata->alias = alias ? estrndup(alias, alias_len) : estrndup(mydata->fname, fname_len); in phar_create_or_parse_filename()
1510 mydata->alias_len = alias ? alias_len : fname_len; in phar_create_or_parse_filename()
1514 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) { in phar_create_or_parse_filename()
1521 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()