2005-09-20 21:26:39 +08:00
|
|
|
/** \file intern.h
|
|
|
|
|
|
|
|
Library for pooling common strings
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2005-10-04 23:11:39 +08:00
|
|
|
#ifndef FISH_INTERN_H
|
|
|
|
#define FISH_INTERN_H
|
|
|
|
|
2005-09-20 21:26:39 +08:00
|
|
|
/**
|
|
|
|
Return an identical copy of the specified string from a pool of unique strings. If the string was not in the pool, add a copy.
|
|
|
|
|
2005-10-24 23:26:25 +08:00
|
|
|
\param in the string to return an interned copy of
|
2005-09-20 21:26:39 +08:00
|
|
|
*/
|
2012-11-19 08:30:30 +08:00
|
|
|
const wchar_t *intern(const wchar_t *in);
|
2005-09-20 21:26:39 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
Insert the specified string literal into the pool of unique
|
|
|
|
strings. The string will not first be copied, and it will not be
|
|
|
|
free'd on exit.
|
2005-10-24 23:26:25 +08:00
|
|
|
|
|
|
|
\param in the string to add to the interned pool
|
2005-09-20 21:26:39 +08:00
|
|
|
*/
|
2012-11-19 08:30:30 +08:00
|
|
|
const wchar_t *intern_static(const wchar_t *in);
|
2005-09-20 21:26:39 +08:00
|
|
|
|
2005-10-04 23:11:39 +08:00
|
|
|
#endif
|