From: Gerd Moellmann Date: Sat, 4 Sep 1999 20:11:09 +0000 (+0000) Subject: (Fmakehash): Exchange optional test and size arguments. X-Git-Tag: emacs-pretest-21.0.90~6903 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5092f3e57b7ce5118d99812012a23248b39b568;p=emacs.git (Fmakehash): Exchange optional test and size arguments. --- diff --git a/src/fns.c b/src/fns.c index f46a7c32d6c..8cbb30b6420 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4311,14 +4311,14 @@ DEFUN ("copy-hash-table", Fcopy_hash_table, Scopy_hash_table, 1, 1, 0, DEFUN ("makehash", Fmakehash, Smakehash, 0, MANY, 0, "Create a new hash table.\n\ -Optional first argument SIZE is a hint to the implementation as\n\ -to how many elements will be put in the table. Default is 65.\n\ -\n\ -Optional second argument TEST specifies how to compare keys in\n\ +Optional first argument TEST specifies how to compare keys in\n\ the table. Predefined tests are `eq', `eql', and `equal'. Default\n\ is `eql'. New tests can be defined with `define-hash-table-test'.\n\ \n\ -Optional third argument WEAK must be one of nil, t, `key',\n\ +Optional second argument SIZE is a hint to the implementation as\n\ +to how many elements will be put in the table. Default is 65.\n\ +\n\ +Optional third argument WEAKNESS must be one of nil, t, `key',\n\ or `value'. Default is nil. Elements of weak hash tables\n\ are removed when their key, value or both are otherwise unreferenced.\n\ \n\ @@ -4340,15 +4340,9 @@ Default is 0.8.") Lisp_Object args2[nargs + 6]; int i, j; - /* Recognize size argument. */ i = j = 0; - if (INTEGERP (args[i])) - { - args2[j++] = QCsize; - args2[j++] = args[i++]; - } - - /* Recognize test argument. */ + + /* Recognize TEST argument. */ if (SYMBOLP (args[i]) && !EQ (args[i], QCrehash_size) && !EQ (args[i], QCrehash_threshold) @@ -4358,7 +4352,14 @@ Default is 0.8.") args2[j++] = args[i++]; } - /* Recognize weakness argument. */ + /* Recognize SIZE argument. */ + if (INTEGERP (args[i])) + { + args2[j++] = QCsize; + args2[j++] = args[i++]; + } + + /* Recognize WEAKNESS argument. */ if (EQ (args[i], Qt) || NILP (args[i]) || EQ (args[i], Qkey)