Skip to content

Commit 961552d

Browse files
committed
Rename skip_initial to begin_initial
1 parent 2867959 commit 961552d

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static inline uint32_t zend_alloc_cache_slot(void) {
8080
}
8181

8282
ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
83-
ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, bool skip_initial);
83+
ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, bool begin_initial);
8484

8585
#ifndef ZTS
8686
ZEND_API zend_compiler_globals compiler_globals;

Zend/zend_compile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ void zend_file_context_begin(zend_file_context *prev_context);
752752
void zend_file_context_end(zend_file_context *prev_context);
753753

754754
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
755-
extern ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, bool skip_initial);
755+
extern ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, bool begin_initial);
756756

757757
ZEND_API int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem);
758758
void startup_scanner(void);
@@ -807,7 +807,7 @@ zend_string *zval_make_interned_string(zval *zv);
807807
struct _zend_arena;
808808

809809
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
810-
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename, bool skip_initial);
810+
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename, bool begin_initial);
811811
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
812812
ZEND_API zend_ast *zend_compile_string_to_ast(
813813
zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);

Zend/zend_language_scanner.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ ZEND_API size_t zend_get_scanned_file_offset(void)
782782
return offset;
783783
}
784784

785-
zend_op_array *compile_string(zend_string *source_string, const char *filename, bool skip_initial)
785+
zend_op_array *compile_string(zend_string *source_string, const char *filename, bool begin_initial)
786786
{
787787
zend_lex_state original_lex_state;
788788
zend_op_array *op_array = NULL;
@@ -799,7 +799,7 @@ zend_op_array *compile_string(zend_string *source_string, const char *filename,
799799
filename_str = zend_string_init(filename, strlen(filename), 0);
800800
zend_prepare_string_for_scanning(&tmp, filename_str);
801801
zend_string_release(filename_str);
802-
if (skip_initial) {
802+
if (begin_initial) {
803803
BEGIN(INITIAL);
804804
} else {
805805
BEGIN(ST_IN_SCRIPTING);

ext/zend_test/test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,17 @@ static ZEND_FUNCTION(zend_test_compile_string)
203203
{
204204
zend_string *source_string = NULL;
205205
zend_string *filename = NULL;
206-
bool skip_initial = 0;
206+
bool begin_initial = 0;
207207

208208
ZEND_PARSE_PARAMETERS_START(3, 3)
209209
Z_PARAM_STR(source_string)
210210
Z_PARAM_STR(filename)
211-
Z_PARAM_BOOL(skip_initial)
211+
Z_PARAM_BOOL(begin_initial)
212212
ZEND_PARSE_PARAMETERS_END();
213213

214214
zend_op_array *op_array = NULL;
215215

216-
op_array = compile_string(source_string, ZSTR_VAL(filename), skip_initial);
216+
op_array = compile_string(source_string, ZSTR_VAL(filename), begin_initial);
217217

218218
if (op_array) {
219219
zval retval;

ext/zend_test/test.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function zend_test_nullable_array_return(): ?array {}
6262

6363
function zend_test_void_return(): void {}
6464

65-
function zend_test_compile_string(string $source_string, string $filename, bool $skip_initial): void {}
65+
function zend_test_compile_string(string $source_string, string $filename, bool $begin_initial): void {}
6666

6767
/** @deprecated */
6868
function zend_test_deprecated(mixed $arg = null): void {}

ext/zend_test/test_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ZEND_END_ARG_INFO()
1313
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_compile_string, 0, 3, IS_VOID, 0)
1414
ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0)
1515
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
16-
ZEND_ARG_TYPE_INFO(0, skip_initial, _IS_BOOL, 0)
16+
ZEND_ARG_TYPE_INFO(0, begin_initial, _IS_BOOL, 0)
1717
ZEND_END_ARG_INFO()
1818

1919
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_deprecated, 0, 0, IS_VOID, 0)

sapi/fuzzer/fuzzer-execute.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ static void fuzzer_execute_ex(zend_execute_data *execute_data) {
5050
}
5151
}
5252

53-
static zend_op_array *(*orig_compile_string)(zend_string *source_string, const char *filename, bool skip_initial);
53+
static zend_op_array *(*orig_compile_string)(zend_string *source_string, const char *filename, bool begin_initial);
5454

55-
static zend_op_array *fuzzer_compile_string(zend_string *str, const char *filename, bool skip_initial) {
55+
static zend_op_array *fuzzer_compile_string(zend_string *str, const char *filename, bool begin_initial) {
5656
if (ZSTR_LEN(str) > MAX_SIZE) {
5757
/* Avoid compiling huge inputs via eval(). */
5858
zend_bailout();
5959
}
6060

61-
return orig_compile_string(str, filename, skip_initial);
61+
return orig_compile_string(str, filename, begin_initial);
6262
}
6363

6464
static void (*orig_execute_internal)(zend_execute_data *execute_data, zval *return_value);

sapi/phpdbg/phpdbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
270270

271271
zend_op_array *(*compile_file)(zend_file_handle *file_handle, int type);
272272
zend_op_array *(*init_compile_file)(zend_file_handle *file_handle, int type);
273-
zend_op_array *(*compile_string)(zend_string *source_string, const char *filename, bool skip_initial);
273+
zend_op_array *(*compile_string)(zend_string *source_string, const char *filename, bool begin_initial);
274274
HashTable file_sources;
275275

276276
zend_arena *oplog_arena; /* arena for storing oplog */

sapi/phpdbg/phpdbg_list.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
309309
return op_array;
310310
}
311311

312-
zend_op_array *phpdbg_compile_string(zend_string *source_string, const char *filename, bool skip_initial) {
312+
zend_op_array *phpdbg_compile_string(zend_string *source_string, const char *filename, bool begin_initial) {
313313
zend_string *fake_name;
314314
zend_op_array *op_array;
315315
phpdbg_file_source *dataptr;
316316
uint32_t line;
317317
char *bufptr, *endptr;
318318

319319
if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
320-
return PHPDBG_G(compile_string)(source_string, filename, skip_initial);
320+
return PHPDBG_G(compile_string)(source_string, filename, begin_initial);
321321
}
322322

323323
dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * ZSTR_LEN(source_string));
@@ -332,7 +332,7 @@ zend_op_array *phpdbg_compile_string(zend_string *source_string, const char *fil
332332
dataptr->lines = ++line;
333333
dataptr->line[line] = endptr - dataptr->buf;
334334

335-
op_array = PHPDBG_G(compile_string)(source_string, filename, skip_initial);
335+
op_array = PHPDBG_G(compile_string)(source_string, filename, begin_initial);
336336

337337
if (op_array == NULL) {
338338
efree(dataptr->buf);

0 commit comments

Comments
 (0)