1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2015 Denys Vlasenko
7 * Licensed under GPLv2, see file LICENSE in this source tree.
9 //kbuild:lib-y += auto_string.o
13 char* FAST_FUNC auto_string(char *str)
15 static char *saved[4];
16 static uint8_t cur_saved; /* = 0 */
18 free(saved[cur_saved]);
19 saved[cur_saved] = str;
20 cur_saved = (cur_saved + 1) & (ARRAY_SIZE(saved)-1);