mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 16:01:04 -08:00
* Short eln filename hashes
* src/comp.c (HASH_LENGTH): New macro. (comp_hash_string, comp_hash_source_file): Trim the hash before returning.
This commit is contained in:
parent
a8b8d220b4
commit
41509d873e
1 changed files with 5 additions and 2 deletions
|
|
@ -413,6 +413,9 @@ load_gccjit_if_necessary (bool mandatory)
|
|||
/* Increase this number to force a new Vcomp_abi_hash to be generated. */
|
||||
#define ABI_VERSION "1"
|
||||
|
||||
/* Length of the hashes used for eln file naming. */
|
||||
#define HASH_LENGTH 8
|
||||
|
||||
/* C symbols emitted for the load relocation mechanism. */
|
||||
#define CURRENT_THREAD_RELOC_SYM "current_thread_reloc"
|
||||
#define PURE_RELOC_SYM "pure_reloc"
|
||||
|
|
@ -662,7 +665,7 @@ comp_hash_string (Lisp_Object string)
|
|||
md5_buffer (SSDATA (string), SCHARS (string), SSDATA (digest));
|
||||
hexbuf_digest (SSDATA (digest), SDATA (digest), MD5_DIGEST_SIZE);
|
||||
|
||||
return digest;
|
||||
return Fsubstring (digest, Qnil, make_fixnum (HASH_LENGTH));
|
||||
}
|
||||
|
||||
static Lisp_Object
|
||||
|
|
@ -688,7 +691,7 @@ comp_hash_source_file (Lisp_Object filename)
|
|||
|
||||
hexbuf_digest (SSDATA (digest), SSDATA (digest), MD5_DIGEST_SIZE);
|
||||
|
||||
return digest;
|
||||
return Fsubstring (digest, Qnil, make_fixnum (HASH_LENGTH));
|
||||
}
|
||||
|
||||
/* Produce a key hashing Vcomp_subr_list. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue