[util] Make PL_Type and PL_Line const-correct

This commit is contained in:
Bill Currie 2020-07-17 00:22:47 +09:00
parent 16c6818612
commit 2b23e01d9a
2 changed files with 4 additions and 4 deletions

View file

@ -129,7 +129,7 @@ char *PL_WritePropertyList (plitem_t *pl);
\param item The object \param item The object
\return the type of the object \return the type of the object
*/ */
pltype_t PL_Type (plitem_t *item) __attribute__((pure)); pltype_t PL_Type (const plitem_t *item) __attribute__((pure));
/** Retrieve the line number of an object. /** Retrieve the line number of an object.
@ -137,7 +137,7 @@ pltype_t PL_Type (plitem_t *item) __attribute__((pure));
\return the line number on which the object began, or 0 if not from a \return the line number on which the object began, or 0 if not from a
string string
*/ */
int PL_Line (plitem_t *item) __attribute__((pure)); int PL_Line (const plitem_t *item) __attribute__((pure));
/** Retrieve a string from a string object. /** Retrieve a string from a string object.

View file

@ -1051,13 +1051,13 @@ PL_WritePropertyList (plitem_t *pl)
} }
VISIBLE pltype_t VISIBLE pltype_t
PL_Type (plitem_t *item) PL_Type (const plitem_t *item)
{ {
return item->type; return item->type;
} }
VISIBLE int VISIBLE int
PL_Line (plitem_t *item) PL_Line (const plitem_t *item)
{ {
return item->line; return item->line;
} }