Skip to content

Clean up dead declarations, const lookup table, and indentation#63

Open
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:pr/cleanup-dead-code
Open

Clean up dead declarations, const lookup table, and indentation#63
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:pr/cleanup-dead-code

Conversation

@iliaal
Copy link
Copy Markdown

@iliaal iliaal commented Jun 7, 2026

Cosmetic cleanup, no behaviour change.

  • php_mailparse.h: remove prototypes for five functions that are neither defined nor registered (mailparse_msg_find, mailparse_msg_getstructure, mailparse_msg_getinfo, mailparse_msg_extract, mailparse_msg_extract_file), plus the duplicate mailparse_msg_parse_file prototype.
  • mailparse_encoding.c: mark the read-only hex2code_map lookup table const (it sits next to the already-const mb_base64_table), and drop the misleading "output a marker but continue" comment in the base64 decoder — the code just ignores the byte.
  • Re-tab two space-indented blocks (add_attr_header_to_zval and the duplicate-header branch in php_mimepart_process_header) to match the surrounding tab indentation.

No behaviour change.

- php_mailparse.h: drop prototypes for five functions that are neither
  defined nor registered (mailparse_msg_find, _getstructure, _getinfo,
  _extract, _extract_file) and the duplicate mailparse_msg_parse_file
  prototype.
- mailparse_encoding.c: mark the read-only hex2code_map lookup table
  const, and drop a stale "output a marker" comment in the base64
  decoder (the code just ignores the byte).
- Re-tab two space-indented blocks (add_attr_header_to_zval and the
  duplicate-header branch in php_mimepart_process_header) to match the
  surrounding tab indentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant