1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * the terms of the Affero GNU General Public License as published by the |
7 | * the terms of the Affero GNU General Public License as published by the |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
9 | * option) any later version. |
… | |
… | |
42 | char string [size]; |
42 | char string [size]; |
43 | }; |
43 | }; |
44 | |
44 | |
45 | // this class is a non-refcounted shared string |
45 | // this class is a non-refcounted shared string |
46 | // it cannot be used to create or store shared strings, but |
46 | // it cannot be used to create or store shared strings, but |
47 | // it can be used to apss shared strings around, i.e. as function arguments |
47 | // it can be used to pass shared strings around, i.e. as function arguments |
48 | // or return values. their lifetime must not span a gc () call, i.e. |
48 | // or return values. their lifetime must not span a gc () call, i.e. |
49 | // they are only valid as temporary values within the same server tick. |
49 | // they are only valid as temporary values within the same server tick. |
50 | struct shstr_tmp |
50 | struct shstr_tmp |
51 | { |
51 | { |
52 | static shstr_vec<sizeof ("(null)")> nullvec; |
52 | static shstr_vec<sizeof ("(null)")> nullvec; |