VirtualBox

Changeset 1946 in kBuild


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

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

Location:
trunk/src/kmk
Files:
3 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;
  • trunk/src/kmk/variable.c

    r1935 r1946  
    108108
    109109#ifdef CONFIG_WITH_STRCACHE2
    110 static struct strcache2 variable_strcache;
     110struct strcache2 variable_strcache;
    111111#endif
    112112
     
    609609  /* lookup the name in the string case, if it's not there it won't
    610610     be in any of the sets either. */
    611   cached_name = strcache2_lookup(&variable_strcache, name, length);
     611  cached_name = strcache2_lookup (&variable_strcache, name, length);
    612612  if (!cached_name)
    613613    return NULL;
  • trunk/src/kmk/variable.h

    r1932 r1946  
    427427
    428428extern int export_all_variables;
     429#ifdef CONFIG_WITH_STRCACHE2
     430extern struct strcache2 variable_strcache;
     431#endif
    429432
    430433#ifdef KMK
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette