summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-object.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-26 13:41:46 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-04-27 12:00:30 +0200
commitb94f53bddbfe599be6d946105f4b54b06009b6ad (patch)
treec9c109d0dd5f90525d3491a85fede3cf613abe62 /source/pdf/pdf-object.c
parentf4d01e231ac609889b18d9073bc314455b875c79 (diff)
downloadmupdf-b94f53bddbfe599be6d946105f4b54b06009b6ad.tar.xz
Add some comments.
Diffstat (limited to 'source/pdf/pdf-object.c')
-rw-r--r--source/pdf/pdf-object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c
index b774f878..837a8033 100644
--- a/source/pdf/pdf-object.c
+++ b/source/pdf/pdf-object.c
@@ -402,9 +402,11 @@ pdf_objcmp(fz_context *ctx, pdf_obj *a, pdf_obj *b)
if (a == b)
return 0;
+ /* a or b is null, true, or false */
if (a <= PDF_FALSE || b <= PDF_FALSE)
return 1;
+ /* a is a constant name */
if (a < PDF_LIMIT)
{
if (b < PDF_LIMIT)
@@ -414,6 +416,7 @@ pdf_objcmp(fz_context *ctx, pdf_obj *a, pdf_obj *b)
return strcmp(PDF_NAME_LIST[(intptr_t)a], NAME(b)->n);
}
+ /* b is a constant name */
if (b < PDF_LIMIT)
{
if (a->kind != PDF_NAME)
@@ -421,6 +424,7 @@ pdf_objcmp(fz_context *ctx, pdf_obj *a, pdf_obj *b)
return strcmp(NAME(a)->n, PDF_NAME_LIST[(intptr_t)b]);
}
+ /* both a and b are allocated objects */
if (a->kind != b->kind)
return 1;