diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-11-25 19:42:34 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-11-25 19:42:34 +0000 |
commit | bdf5c8848a2de071c8380fab86a1a49215ed5ee7 (patch) | |
tree | 8ff2e40bca4f337e5db112284992e6be67cea820 /fitz/base_object.c | |
parent | 5f6c8d94faecc0bd87113a138befe554ab2172b2 (diff) | |
parent | 6e14149d3e915f559f99276a525862e28d6f0478 (diff) | |
download | mupdf-bdf5c8848a2de071c8380fab86a1a49215ed5ee7.tar.xz |
Merge branch 'master' into context
Diffstat (limited to 'fitz/base_object.c')
-rw-r--r-- | fitz/base_object.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fitz/base_object.c b/fitz/base_object.c index b1feeb2c..2876f363 100644 --- a/fitz/base_object.c +++ b/fitz/base_object.c @@ -501,6 +501,18 @@ fz_array_insert(fz_obj *obj, fz_obj *item) } } +int +fz_array_contains(fz_obj *arr, fz_obj *obj) +{ + int i; + + for (i = 0; i < fz_array_len(arr); i++) + if (!fz_objcmp(fz_array_get(arr, i), obj)) + return 1; + + return 0; +} + /* dicts may only have names as keys! */ static int keyvalcmp(const void *ap, const void *bp) |