2016-05-02 11:26:32 +08:00
|
|
|
// Library for pooling common strings.
|
2005-10-04 23:11:39 +08:00
|
|
|
#ifndef FISH_INTERN_H
|
|
|
|
#define FISH_INTERN_H
|
|
|
|
|
2016-05-02 11:26:32 +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.
|
|
|
|
///
|
|
|
|
/// \param in the string to return an interned copy of.
|
2012-11-19 08:30:30 +08:00
|
|
|
const wchar_t *intern(const wchar_t *in);
|
2005-09-20 21:26:39 +08:00
|
|
|
|
2016-05-02 11:26:32 +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.
|
|
|
|
///
|
|
|
|
/// \param in the string to add to the interned pool
|
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
|