pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2021-03-22
2021-03-22 14:12:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>
ff85728dd10ee735f8773db52b79ab102b468571 (
17
lines) (+
9
/-
8
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Added flags to pike_types_le().
5129:
MAKE_CONSTANT_TYPE(array_zero, tArr(tZero)); MAKE_CONSTANT_TYPE(mapping_zero, tMap(tZero, tZero));
-
if ((pike_types_le(array_zero, (*arg0)->type) ||
-
pike_types_le(mapping_zero, (*arg0)->type))) {
+
if ((pike_types_le(array_zero, (*arg0)->type
, 0, 0
) ||
+
pike_types_le(mapping_zero, (*arg0)->type
, 0, 0
))) {
/* First argument might be an array or a mapping. * * replace() is destructive on arrays and mappings.
5150:
*/ struct program * volatile replace_compiler = NULL;
-
if (arg1 && ((pike_types_le((*arg1)->type, array_type_string) &&
+
if (arg1 && ((pike_types_le((*arg1)->type, array_type_string
, 0, 0
) &&
arg2 &&
-
(pike_types_le((*arg2)->type, array_type_string) ||
-
pike_types_le((*arg2)->type, string_type_string))) ||
-
(pike_types_le((*arg1)->type, mapping_type_string)))) {
+
(pike_types_le((*arg2)->type, array_type_string
, 0, 0
) ||
+
pike_types_le((*arg2)->type, string_type_string
, 0, 0
))) ||
+
(pike_types_le((*arg1)->type, mapping_type_string
, 0, 0
)))) {
/* Handle the cases: * * replace(string, array, array)
5163:
*/ extern struct program *multi_string_replace_program; replace_compiler = multi_string_replace_program;
-
} else if (arg1 && pike_types_le((*arg1)->type, string_type_string) &&
-
arg2 && pike_types_le((*arg2)->type, string_type_string)) {
+
} else if (arg1 && pike_types_le((*arg1)->type, string_type_string
, 0, 0
) &&
+
arg2 && pike_types_le((*arg2)->type, string_type_string
, 0, 0
)) {
extern struct program *single_string_replace_program; replace_compiler = single_string_replace_program; }