fixed a bug where this parameter was not marked VDECODE_FLAG_BYREF for SDKCall()
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_SOURCEMOD_CORE_STRINGTABLE_H_
16 #define _INCLUDE_SOURCEMOD_CORE_STRINGTABLE_H_
21 BaseMemTable(unsigned int init_size);
25 * Allocates 'size' bytes of memory.
26 * Optionally outputs the address through 'addr'.
27 * Returns an index >= 0 on success, < 0 on failure.
29 int CreateMem(unsigned int size, void **addr);
32 * Given an index into the memory table, returns its address.
33 * Returns NULL if invalid.
35 void *GetAddress(int index);
38 * Scraps the memory table. For caching purposes, the memory
39 * is not freed, however subsequent calls to CreateMem() will
40 * begin at the first index again.
46 unsigned char *membase;
54 BaseStringTable(unsigned int init_size);
58 * Adds a string to the string table and returns its index.
60 int AddString(const char *string);
63 * Given an index into the string table, returns the associated string.
65 inline const char *GetString(int str)
67 return (const char *)m_table.GetAddress(str);
71 * Scraps the string table. For caching purposes, the memory
72 * is not freed, however subsequent calls to AddString() will
73 * begin at the first index again.
78 * Returns the parent BaseMemTable that this string table uses.
80 inline BaseMemTable *GetMemTable()
88 #endif //_INCLUDE_SOURCEMOD_CORE_STRINGTABLE_H_