Visitar URL original
bpo-40501: Replace ctypes code in uuid with native module by zooba · Pull Request #19948 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace comment with code
  • Loading branch information
zooba committed May 6, 2020
commit fca6701cad9cee5667a43f025e8116c8e5035ef6
5 changes: 3 additions & 2 deletions Modules/_uuidmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ py_UuidCreate(PyObject *Py_UNUSED(context),
static int
uuid_exec(PyObject *module) {
assert(sizeof(uuid_t) == 16);
#if defined(HAVE_UUID_GENERATE_TIME_SAFE)
#if defined(MS_WINDOWS)
int has_uuid_generate_time_safe = 0;
#elif defined(HAVE_UUID_GENERATE_TIME_SAFE)
int has_uuid_generate_time_safe = 1;
#else
/* including on Windows */
int has_uuid_generate_time_safe = 0;
#endif
Comment thread
zooba marked this conversation as resolved.
if (PyModule_AddIntConstant(module, "has_uuid_generate_time_safe",
Expand Down