mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-10 12:10:35 +02:00
changes to make builtins that perform assignments work better with arbitrary associative array keys
This commit is contained in:
+4
-6
@@ -990,10 +990,7 @@ builtin_bind_variable (name, value, flags)
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
/* Callers are responsible for calling this with array references that have
|
||||
already undergone valid_array_reference checks.
|
||||
Affected builtins: read, printf
|
||||
To make this *really* work, needs additional downstream support, starting
|
||||
with assign_array_element and array_variable_name. */
|
||||
already undergone valid_array_reference checks (read, printf). */
|
||||
vflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0;
|
||||
bindflags = flags | (assoc_expand_once ? ASS_NOEXPAND : 0) | ASS_ALLOWALLSUB;
|
||||
if (flags & ASS_NOEXPAND)
|
||||
@@ -1016,13 +1013,14 @@ builtin_bind_variable (name, value, flags)
|
||||
}
|
||||
|
||||
SHELL_VAR *
|
||||
builtin_bind_var_to_int (name, val)
|
||||
builtin_bind_var_to_int (name, val, flags)
|
||||
char *name;
|
||||
intmax_t val;
|
||||
int flags;
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
|
||||
v = bind_var_to_int (name, val, ASS_ALLOWALLSUB);
|
||||
v = bind_var_to_int (name, val, flags|ASS_ALLOWALLSUB);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user