File: intern.h

package info (click to toggle)
fish 1.23.0-5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,416 kB
  • ctags: 2,503
  • sloc: ansic: 35,998; sh: 2,818; makefile: 566
file content (33 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/** \file intern.h

    Library for pooling common strings

*/

#ifndef FISH_INTERN_H
#define FISH_INTERN_H

#include <wchar.h>

/**
   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
*/
const wchar_t *intern( const wchar_t *in );

/**
   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
*/
const wchar_t *intern_static( const wchar_t *in );

/**
   Free all interned strings. Only call this at shutdown.
*/
void intern_free_all();

#endif