diff --git a/pdfio-object.c b/pdfio-object.c index b7e963b..880557c 100644 --- a/pdfio-object.c +++ b/pdfio-object.c @@ -268,26 +268,6 @@ pdfioObjGetDict(pdfio_obj_t *obj) // I - Object } -// -// 'pdfioObjGetName()' - Get the name value associated with an object. -// - -const char * // O - Dictionary or `NULL` on error -pdfioObjGetName(pdfio_obj_t *obj) // I - Object -{ - if (!obj) - return (NULL); - - if (obj->value.type == PDFIO_VALTYPE_NONE) - _pdfioObjLoad(obj); - - if (obj->value.type == PDFIO_VALTYPE_NAME) - return (obj->value.value.name); - else - return (NULL); -} - - // // '_pdfioObjGetExtension()' - Get the extension pointer for an object. // @@ -353,6 +333,26 @@ pdfioObjGetLength(pdfio_obj_t *obj) // I - Object } +// +// 'pdfioObjGetName()' - Get the name value associated with an object. +// + +const char * // O - Dictionary or `NULL` on error +pdfioObjGetName(pdfio_obj_t *obj) // I - Object +{ + if (!obj) + return (NULL); + + if (obj->value.type == PDFIO_VALTYPE_NONE) + _pdfioObjLoad(obj); + + if (obj->value.type == PDFIO_VALTYPE_NAME) + return (obj->value.value.name); + else + return (NULL); +} + + // // 'pdfioObjGetNumber()' - Get the object's number. //