Changeset 1946 for trunk/src/kmk/read.c


Ignore:
Timestamp:
Oct 26, 2008, 4:09:15 AM (17 years ago)
Author:
bird
Message:

kmk: Caught a variable::value update that I'd missed when implementing CONFIG_WITH_VALUE_LENGTH.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/read.c

    r1931 r1946  
    24452445        {
    24462446          struct variable *gv;
     2447#ifndef CONFIG_WITH_STRCACHE2
    24472448          int len = strlen(v->name);
     2449#else
     2450          int len = strcache2_get_len (&variable_strcache, v->name);
     2451#endif
    24482452
    24492453          gv = lookup_variable (v->name, len);
    24502454          if (gv && (gv->origin == o_env_override || gv->origin == o_command))
    24512455            {
     2456#ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE
     2457              assert (!v->rdonly_val); /* paranoia */
     2458#endif
    24522459              if (v->value != 0)
    24532460                free (v->value);
     2461#ifndef CONFIG_WITH_VALUE_LENGTH
    24542462              v->value = xstrdup (gv->value);
     2463#else
     2464              v->value = savestring (gv->value, gv->value_length);
     2465              v->value_length = gv->value_length;
     2466#endif
    24552467              v->origin = gv->origin;
    24562468              v->recursive = gv->recursive;
Note: See TracChangeset for help on using the changeset viewer.