gh-131876: extract _hashlib helpers into a separate directory (#136995)

The `Modules/hashlib.h` helper file is now removed and split into multiple files:

* `Modules/_hashlib/hashlib_buffer.[ch]` -- Utilities for getting a buffer view and handling buffer inputs.
* `Modules/_hashlib/hashlib_fetch.h` -- Utilities used when fetching a message digest from a digest-like identifier.
  Currently, this file only contains common error messages as the fetching API is not yet implemented.
* `Modules/_hashlib/hashlib_mutex.h` -- Utilities for managing the lock on cryptographic hash objects.
This commit is contained in:
Bénédikt Tran 2025-07-28 11:28:48 +02:00 committed by GitHub
parent eefd70f0ed
commit 45138d3584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 346 additions and 221 deletions

View file

@ -15,10 +15,12 @@
#endif
#include "Python.h"
#include "hashlib.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h"
#include "pycore_moduleobject.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h"
#include "_hashlib/hashlib_buffer.h"
#include "_hashlib/hashlib_mutex.h"
// QUICK CPU AUTODETECTION
//