mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-12-27 05:48:20 +01:00
Add pdfioObjGetArray.
This commit is contained in:
parent
18853ca3d5
commit
b030c24ba1
@ -60,6 +60,26 @@ _pdfioObjDelete(pdfio_obj_t *obj) // I - Object
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'pdfioObjGetArray()' - Get the array associated with an object.
|
||||
//
|
||||
|
||||
pdfio_array_t * // O - Array or `NULL` on error
|
||||
pdfioObjGetArray(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_ARRAY)
|
||||
return (obj->value.value.array);
|
||||
else
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'pdfioObjGetDict()' - Get the dictionary associated with an object.
|
||||
//
|
||||
|
1
pdfio.h
1
pdfio.h
@ -162,6 +162,7 @@ extern pdfio_file_t *pdfioFileOpen(const char *filename, pdfio_error_cb_t error_
|
||||
|
||||
extern bool pdfioObjClose(pdfio_obj_t *obj) PDFIO_PUBLIC;
|
||||
extern pdfio_stream_t *pdfioObjCreateStream(pdfio_obj_t *obj, pdfio_filter_t compression) PDFIO_PUBLIC;
|
||||
extern pdfio_array_t *pdfioObjGetArray(pdfio_obj_t *obj) PDFIO_PUBLIC;
|
||||
extern pdfio_dict_t *pdfioObjGetDict(pdfio_obj_t *obj) PDFIO_PUBLIC;
|
||||
extern unsigned short pdfioObjGetGeneration(pdfio_obj_t *obj) PDFIO_PUBLIC;
|
||||
extern size_t pdfioObjGetLength(pdfio_obj_t *obj) PDFIO_PUBLIC;
|
||||
|
Loading…
Reference in New Issue
Block a user