Skip to content

Commit 0b37777

Browse files
committed
ext/phar/phar_object.c: add some const qualifiers
1 parent 44a863a commit 0b37777

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/phar/phar_object.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static zend_class_entry *phar_ce_entry;
4545
RETURN_THROWS(); \
4646
}
4747

48-
static int phar_file_type(HashTable *mimes, char *file, char **mime_type) /* {{{ */
48+
static int phar_file_type(const HashTable *mimes, const char *file, char **mime_type) /* {{{ */
4949
{
5050
char *ext;
5151
phar_mime_type *mime;
@@ -65,7 +65,7 @@ static int phar_file_type(HashTable *mimes, char *file, char **mime_type) /* {{{
6565
}
6666
/* }}} */
6767

68-
static void phar_mung_server_vars(char *fname, char *entry, size_t entry_len, char *basename, size_t request_uri_len) /* {{{ */
68+
static void phar_mung_server_vars(char *fname, char *entry, size_t entry_len, const char *basename, size_t request_uri_len) /* {{{ */
6969
{
7070
HashTable *_SERVER;
7171
zval *stuff;
@@ -151,7 +151,7 @@ static void phar_mung_server_vars(char *fname, char *entry, size_t entry_len, ch
151151
}
152152
/* }}} */
153153

154-
static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char *mime_type, int code, char *entry, size_t entry_len, char *arch, char *basename, char *ru, size_t ru_len) /* {{{ */
154+
static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char *mime_type, int code, char *entry, size_t entry_len, char *arch, const char *basename, char *ru, size_t ru_len) /* {{{ */
155155
{
156156
char *name = NULL, buf[8192];
157157
const char *cwd;
@@ -349,7 +349,7 @@ static void phar_do_404(phar_archive_data *phar, char *fname, size_t fname_len,
349349
/* post-process REQUEST_URI and retrieve the actual request URI. This is for
350350
cases like http://localhost/blah.phar/path/to/file.php/extra/stuff
351351
which calls "blah.phar" file "path/to/file.php" with PATH_INFO "/extra/stuff" */
352-
static void phar_postprocess_ru_web(char *fname, size_t fname_len, char **entry, size_t *entry_len, char **ru, size_t *ru_len) /* {{{ */
352+
static void phar_postprocess_ru_web(const char *fname, size_t fname_len, char **entry, size_t *entry_len, char **ru, size_t *ru_len) /* {{{ */
353353
{
354354
char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL;
355355
size_t e_len = *entry_len - 1, u_len = 0;
@@ -627,7 +627,7 @@ PHP_METHOD(Phar, webPhar)
627627
|| (sapi_mod_name_len == sizeof("litespeed") - 1 && !strncmp(sapi_module.name, "litespeed", sizeof("litespeed") - 1))) {
628628

629629
if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) != IS_UNDEF) {
630-
HashTable *_server = Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]);
630+
const HashTable *_server = Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]);
631631
zval *z_script_name, *z_path_info;
632632

633633
if (NULL == (z_script_name = zend_hash_str_find(_server, "SCRIPT_NAME", sizeof("SCRIPT_NAME")-1)) ||
@@ -3114,7 +3114,7 @@ static int phar_set_compression(zval *zv, void *argument) /* {{{ */
31143114

31153115
static int phar_test_compression(zval *zv, void *argument) /* {{{ */
31163116
{
3117-
phar_entry_info *entry = (phar_entry_info *)Z_PTR_P(zv);
3117+
const phar_entry_info *entry = Z_PTR_P(zv);
31183118

31193119
if (entry->is_deleted) {
31203120
return ZEND_HASH_APPLY_KEEP;

0 commit comments

Comments
 (0)