summaryrefslogtreecommitdiff
path: root/Zend/zend_language_scanner.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_language_scanner.c')
-rw-r--r--Zend/zend_language_scanner.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 78654194d1..08db450374 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -535,9 +535,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
file_path = file_handle->filename;
}
- compiled_filename = STR_INIT(file_path, strlen(file_path), 0);
+ compiled_filename = zend_string_init(file_path, strlen(file_path), 0);
zend_set_compiled_filename(compiled_filename TSRMLS_CC);
- STR_RELEASE(compiled_filename);
+ zend_string_release(compiled_filename);
if (CG(start_lineno)) {
CG(zend_lineno) = CG(start_lineno);
@@ -660,7 +660,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
/* enforce ZEND_MMAP_AHEAD trailing NULLs for flex... */
old_len = Z_STRLEN_P(str);
- Z_STR_P(str) = STR_REALLOC(Z_STR_P(str), old_len + ZEND_MMAP_AHEAD, 0);
+ Z_STR_P(str) = zend_string_realloc(Z_STR_P(str), old_len + ZEND_MMAP_AHEAD, 0);
Z_TYPE_INFO_P(str) = IS_STRING_EX;
memset(Z_STRVAL_P(str) + old_len, 0, ZEND_MMAP_AHEAD + 1);
@@ -689,9 +689,9 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
yy_scan_buffer(buf, size TSRMLS_CC);
- new_compiled_filename = STR_INIT(filename, strlen(filename), 0);
+ new_compiled_filename = zend_string_init(filename, strlen(filename), 0);
zend_set_compiled_filename(new_compiled_filename TSRMLS_CC);
- STR_RELEASE(new_compiled_filename);
+ zend_string_release(new_compiled_filename);
CG(zend_lineno) = 1;
CG(increment_lineno) = 0;
RESET_DOC_COMMENT();
@@ -957,7 +957,7 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
hex_buf[1] = *(++s);
Z_STRLEN_P(zendlval)--;
}
- *t++ = (char) strtol(hex_buf, NULL, 16);
+ *t++ = (char) ZEND_STRTOL(hex_buf, NULL, 16);
} else {
*t++ = '\\';
*t++ = *s;
@@ -978,7 +978,7 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
Z_STRLEN_P(zendlval)--;
}
}
- *t++ = (char) strtol(octal_buf, NULL, 8);
+ *t++ = (char) ZEND_STRTOL(octal_buf, NULL, 8);
} else {
*t++ = '\\';
*t++ = *s;
@@ -1639,7 +1639,7 @@ yy61:
yyleng = YYCURSOR - SCNG(yy_text);
#line 2086 "Zend/zend_language_scanner.l"
{
- Z_LVAL_P(zendlval) = (long) '{';
+ Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
@@ -1867,7 +1867,7 @@ yy83:
yyleng = YYCURSOR - SCNG(yy_text);
#line 2086 "Zend/zend_language_scanner.l"
{
- Z_LVAL_P(zendlval) = (long) '{';
+ Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
@@ -2126,7 +2126,7 @@ yy107:
yyleng = YYCURSOR - SCNG(yy_text);
#line 2086 "Zend/zend_language_scanner.l"
{
- Z_LVAL_P(zendlval) = (long) '{';
+ Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
@@ -2946,10 +2946,10 @@ yy173:
#line 1536 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
- ZVAL_LONG(zendlval, strtol(yytext, NULL, 0));
+ ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, NULL, 0));
} else {
errno = 0;
- ZVAL_LONG(zendlval, strtol(yytext, NULL, 0));
+ ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, NULL, 0));
if (errno == ERANGE) { /* Overflow */
if (yytext[0] == '0') { /* octal overflow */
ZVAL_DOUBLE(zendlval, zend_oct_strtod(yytext, NULL));
@@ -3307,11 +3307,11 @@ yy200:
--len;
}
- if (len < SIZEOF_LONG * 8) {
+ if (len < SIZEOF_ZEND_INT * 8) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
- ZVAL_LONG(zendlval, strtol(bin, NULL, 2));
+ ZVAL_LONG(zendlval, ZEND_STRTOL(bin, NULL, 2));
}
return T_LNUMBER;
} else {
@@ -3342,11 +3342,11 @@ yy203:
len--;
}
- if (len < SIZEOF_LONG * 2 || (len == SIZEOF_LONG * 2 && *hex <= '7')) {
+ if (len < SIZEOF_ZEND_INT * 2 || (len == SIZEOF_ZEND_INT * 2 && *hex <= '7')) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
- ZVAL_LONG(zendlval, strtol(hex, NULL, 16));
+ ZVAL_LONG(zendlval, ZEND_STRTOL(hex, NULL, 16));
}
return T_LNUMBER;
} else {
@@ -3562,7 +3562,7 @@ yy235:
HANDLE_NEWLINES(yytext, yyleng);
if (doc_com) {
- CG(doc_comment) = STR_INIT(yytext, yyleng, 0);
+ CG(doc_comment) = zend_string_init(yytext, yyleng, 0);
return T_DOC_COMMENT;
}
@@ -4191,11 +4191,11 @@ yy322:
filename = STR_EMPTY_ALLOC();
}
- dirname = STR_INIT(filename->val, filename->len, 0);
+ dirname = zend_string_init(filename->val, filename->len, 0);
zend_dirname(dirname->val, dirname->len);
if (strcmp(dirname->val, ".") == 0) {
- dirname = STR_REALLOC(dirname, MAXPATHLEN, 0);
+ dirname = zend_string_realloc(dirname, MAXPATHLEN, 0);
#if HAVE_GETCWD
VCWD_GETCWD(dirname->val, MAXPATHLEN);
#elif HAVE_GETWD
@@ -4358,7 +4358,7 @@ yy352:
if (!filename) {
ZVAL_EMPTY_STRING(zendlval);
} else {
- ZVAL_STR(zendlval, STR_COPY(filename));
+ ZVAL_STR(zendlval, zend_string_copy(filename));
}
return T_FILE;
}
@@ -7605,7 +7605,7 @@ yy839:
#line 1577 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
- ZVAL_LONG(zendlval, strtol(yytext, NULL, 10));
+ ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, NULL, 10));
} else {
ZVAL_STRINGL(zendlval, yytext, yyleng);
}