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()
1096 if (mydata->is_persistent) { in phar_parse_pharfile()
1106 phar_parse_metadata_lazy(buffer, &mydata->metadata_tracker, len, mydata->is_persistent); in phar_parse_pharfile()
1110 zend_hash_init(&mydata->manifest, manifest_count, in phar_parse_pharfile()
1111 zend_get_hash_value, destroy_phar_manifest_entry, (bool)mydata->is_persistent); in phar_parse_pharfile()
1112 zend_hash_init(&mydata->mounted_dirs, 5, in phar_parse_pharfile()
1113 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1114 zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, in phar_parse_pharfile()
1115 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_parse_pharfile()
1116 mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1118 phar_unixify_path_separators(mydata->fname, fname_len); in phar_parse_pharfile()
1120 mydata->fname_len = fname_len; in phar_parse_pharfile()
1123 entry.phar = mydata; in phar_parse_pharfile()
1125 entry.is_persistent = mydata->is_persistent; in phar_parse_pharfile()
1152 phar_add_virtual_dirs(mydata, buffer, entry.filename_len); in phar_parse_pharfile()
1159 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1160 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1162 if (mydata->min_timestamp > entry.timestamp) { in phar_parse_pharfile()
1163 mydata->min_timestamp = entry.timestamp; in phar_parse_pharfile()
1164 } else if (mydata->max_timestamp < entry.timestamp) { in phar_parse_pharfile()
1165 mydata->max_timestamp = entry.timestamp; in phar_parse_pharfile()
1221 if (mydata->is_persistent) { in phar_parse_pharfile()
1226 zend_hash_add_mem(&mydata->manifest, str, (void*)&entry, sizeof(phar_entry_info)); in phar_parse_pharfile()
1230 …snprintf(mydata->version, sizeof(mydata->version), "%u.%u.%u", manifest_ver >> 12, (manifest_ver >… in phar_parse_pharfile()
1231 mydata->internal_file_start = halt_offset + manifest_len + 4; in phar_parse_pharfile()
1232 mydata->halt_offset = halt_offset; in phar_parse_pharfile()
1233 mydata->flags = manifest_flags; in phar_parse_pharfile()
1234 endbuffer = strrchr(mydata->fname, '/'); in phar_parse_pharfile()
1237 mydata->ext = memchr(endbuffer, '.', (mydata->fname + fname_len) - endbuffer); in phar_parse_pharfile()
1238 if (mydata->ext == endbuffer) { in phar_parse_pharfile()
1239 mydata->ext = memchr(endbuffer + 1, '.', (mydata->fname + fname_len) - endbuffer - 1); in phar_parse_pharfile()
1241 if (mydata->ext) { in phar_parse_pharfile()
1242 mydata->ext_len = (mydata->fname + mydata->fname_len) - mydata->ext; in phar_parse_pharfile()
1246 mydata->alias = alias ? in phar_parse_pharfile()
1247 pestrndup(alias, alias_len, mydata->is_persistent) : in phar_parse_pharfile()
1248 pestrndup(mydata->fname, fname_len, mydata->is_persistent); in phar_parse_pharfile()
1249 mydata->alias_len = alias ? alias_len : fname_len; in phar_parse_pharfile()
1250 mydata->sig_flags = sig_flags; in phar_parse_pharfile()
1251 mydata->fp = fp; in phar_parse_pharfile()
1252 mydata->sig_len = sig_len; in phar_parse_pharfile()
1253 mydata->signature = signature; in phar_parse_pharfile()
1259 mydata->is_temporary_alias = temp_alias; in phar_parse_pharfile()
1261 if (!phar_validate_alias(mydata->alias, mydata->alias_len)) { in phar_parse_pharfile()
1275 if (mydata->is_persistent) { in phar_parse_pharfile()
1280 zend_hash_add_ptr(&(PHAR_G(phar_alias_map)), str, mydata); in phar_parse_pharfile()
1283 mydata->is_temporary_alias = 1; in phar_parse_pharfile()
1286 if (mydata->is_persistent) { in phar_parse_pharfile()
1287 str = zend_string_init_interned(mydata->fname, fname_len, 1); in phar_parse_pharfile()
1289 str = zend_string_init(mydata->fname, fname_len, 0); in phar_parse_pharfile()
1291 zend_hash_add_ptr(&(PHAR_G(phar_fname_map)), str, mydata); in phar_parse_pharfile()
1296 *pphar = mydata; in phar_parse_pharfile()
1385 phar_archive_data *mydata; in phar_create_or_parse_filename() local
1391 pphar = &mydata; in phar_create_or_parse_filename()
1437 mydata = ecalloc(1, sizeof(phar_archive_data)); in phar_create_or_parse_filename()
1438 mydata->fname = expand_filepath(fname, NULL); in phar_create_or_parse_filename()
1439 if (mydata->fname == NULL) { in phar_create_or_parse_filename()
1440 efree(mydata); in phar_create_or_parse_filename()
1443 fname_len = strlen(mydata->fname); in phar_create_or_parse_filename()
1445 phar_unixify_path_separators(mydata->fname, fname_len); in phar_create_or_parse_filename()
1447 p = strrchr(mydata->fname, '/'); in phar_create_or_parse_filename()
1450 mydata->ext = memchr(p, '.', (mydata->fname + fname_len) - p); in phar_create_or_parse_filename()
1451 if (mydata->ext == p) { in phar_create_or_parse_filename()
1452 mydata->ext = memchr(p + 1, '.', (mydata->fname + fname_len) - p - 1); in phar_create_or_parse_filename()
1454 if (mydata->ext) { in phar_create_or_parse_filename()
1455 mydata->ext_len = (mydata->fname + fname_len) - mydata->ext; in phar_create_or_parse_filename()
1460 *pphar = mydata; in phar_create_or_parse_filename()
1463 zend_hash_init(&mydata->manifest, sizeof(phar_entry_info), in phar_create_or_parse_filename()
1465 zend_hash_init(&mydata->mounted_dirs, sizeof(char *), in phar_create_or_parse_filename()
1467 zend_hash_init(&mydata->virtual_dirs, sizeof(char *), in phar_create_or_parse_filename()
1468 zend_get_hash_value, NULL, (bool)mydata->is_persistent); in phar_create_or_parse_filename()
1469 mydata->fname_len = fname_len; in phar_create_or_parse_filename()
1470 snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); in phar_create_or_parse_filename()
1471 mydata->is_temporary_alias = alias ? 0 : 1; in phar_create_or_parse_filename()
1472 mydata->internal_file_start = -1; in phar_create_or_parse_filename()
1473 mydata->fp = NULL; in phar_create_or_parse_filename()
1474 mydata->is_writeable = 1; in phar_create_or_parse_filename()
1475 mydata->is_brandnew = 1; in phar_create_or_parse_filename()
1477 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_create_or_parse_filename()
1482 mydata->is_data = 1; in phar_create_or_parse_filename()
1484 mydata->is_tar = 1; in phar_create_or_parse_filename()
1491 …har \"%s\" cannot set alias \"%s\", already in use by another phar archive", mydata->fname, alias); in phar_create_or_parse_filename()
1494 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1504 mydata->alias = alias ? estrndup(alias, alias_len) : estrndup(mydata->fname, fname_len); in phar_create_or_parse_filename()
1505 mydata->alias_len = alias ? alias_len : fname_len; in phar_create_or_parse_filename()
1509 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) { in phar_create_or_parse_filename()
1516 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()