mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
[util] Make plists more const-correct
This commit is contained in:
parent
f8961e4376
commit
4eb07220cd
3 changed files with 8 additions and 8 deletions
|
@ -132,7 +132,7 @@ plitem_t *PL_GetPropertyList (const char *string,
|
|||
\return the text representation of the property list
|
||||
\note You are responsible for freeing the returned string.
|
||||
*/
|
||||
char *PL_WritePropertyList (plitem_t *pl);
|
||||
char *PL_WritePropertyList (const plitem_t *pl);
|
||||
|
||||
/** Retrieve the type of an object.
|
||||
|
||||
|
@ -226,7 +226,7 @@ plitem_t *PL_ObjectAtIndex (const plitem_t *array, int index) __attribute__((pur
|
|||
\return an Array containing Strings or NULL if dict isn't a dictionary
|
||||
\note You are responsible for freeing this array.
|
||||
*/
|
||||
plitem_t *PL_D_AllKeys (plitem_t *dict);
|
||||
plitem_t *PL_D_AllKeys (const plitem_t *dict);
|
||||
|
||||
/** Retrieve the number of keys in a dictionary.
|
||||
|
||||
|
@ -265,7 +265,7 @@ qboolean PL_A_AddObject (plitem_t *array, plitem_t *item);
|
|||
|
||||
\return number of objects in the array
|
||||
*/
|
||||
int PL_A_NumObjects (plitem_t *array) __attribute__((pure));
|
||||
int PL_A_NumObjects (const plitem_t *array) __attribute__((pure));
|
||||
|
||||
/** Insert an item into an array before the specified location.
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ ED_Parse (progs_t *pr, const char *data)
|
|||
// new style (plist) entity data
|
||||
entity_list = PL_GetPropertyList (data, pr->hashlink_freelist);
|
||||
} else {
|
||||
// oldstyle entity data
|
||||
// old style entity data
|
||||
Script_UngetToken (script);
|
||||
entity_list = ED_ConvertToPlist (script, 0, pr->hashlink_freelist);
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ PL_RemoveObjectForKey (const plitem_t *item, const char *key)
|
|||
}
|
||||
|
||||
VISIBLE plitem_t *
|
||||
PL_D_AllKeys (plitem_t *item)
|
||||
PL_D_AllKeys (const plitem_t *item)
|
||||
{
|
||||
pldict_t *dict = (pldict_t *) item->data;
|
||||
dictkey_t *current;
|
||||
|
@ -440,7 +440,7 @@ PL_A_AddObject (plitem_t *array, plitem_t *item)
|
|||
}
|
||||
|
||||
VISIBLE int
|
||||
PL_A_NumObjects (plitem_t *array)
|
||||
PL_A_NumObjects (const plitem_t *array)
|
||||
{
|
||||
if (array->type != QFArray)
|
||||
return 0;
|
||||
|
@ -1056,7 +1056,7 @@ write_string (dstring_t *dstr, const char *str)
|
|||
}
|
||||
|
||||
static void
|
||||
write_item (dstring_t *dstr, plitem_t *item, int level)
|
||||
write_item (dstring_t *dstr, const plitem_t *item, int level)
|
||||
{
|
||||
dictkey_t *current;
|
||||
plarray_t *array;
|
||||
|
@ -1107,7 +1107,7 @@ write_item (dstring_t *dstr, plitem_t *item, int level)
|
|||
}
|
||||
|
||||
VISIBLE char *
|
||||
PL_WritePropertyList (plitem_t *pl)
|
||||
PL_WritePropertyList (const plitem_t *pl)
|
||||
{
|
||||
dstring_t *dstr = dstring_newstr ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue