Skip to content

Conversation

@Girgias
Copy link
Member

@Girgias Girgias commented Nov 14, 2025

  • Use uint32_t
  • Remove some useless size_t casts
  • Make some structs private, as only ever used by the language scanner
  • Add explicit header includes and explanations

@Girgias Girgias marked this pull request as ready for review November 14, 2025 09:03
@Girgias Girgias requested a review from ndossche November 14, 2025 09:03
zend_arena *ast_arena;
} zend_lex_state;

typedef struct _zend_heredoc_label {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to make these private, as they can be accessed via the public struct via heredoc_label_stack. Similar issue for zend_nest_location.

#define ZEND_SCANNER_H

#include "zend_globals.h"
#include "zend_arena.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still include zend_globals, so what exactly do we gain by adding all these headers explicitly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants