aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog3
-rw-r--r--lib-src/make-docfile.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 8bdf7d1fb16..9a1fc7a3e9f 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,8 @@
12015-01-05 Paul Eggert <eggert@cs.ucla.edu> 12015-01-05 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Use 0 for Qnil
4 * make-docfile.c (compare_globals): Consider 'nil' to be the least.
5
3 Compute C decls for DEFSYMs automatically 6 Compute C decls for DEFSYMs automatically
4 Fixes Bug#15880. 7 Fixes Bug#15880.
5 * make-docfile.c: Revamp to generate table of symbols, too. 8 * make-docfile.c: Revamp to generate table of symbols, too.
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index b05a634eb75..22c4bad2e3f 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -613,6 +613,16 @@ compare_globals (const void *a, const void *b)
613 if (ga->type != gb->type) 613 if (ga->type != gb->type)
614 return ga->type - gb->type; 614 return ga->type - gb->type;
615 615
616 /* Consider "nil" to be the least, so that aQnil is firat. That
617 way, Qnil's internal representation is zero, which is a bit faster. */
618 if (ga->type == SYMBOL)
619 {
620 bool a_nil = strcmp (ga->name, "Qnil") == 0;
621 bool b_nil = strcmp (gb->name, "Qnil") == 0;
622 if (a_nil | b_nil)
623 return b_nil - a_nil;
624 }
625
616 return strcmp (ga->name, gb->name); 626 return strcmp (ga->name, gb->name);
617} 627}
618 628