STINNER Victor <victor.stin...@gmail.com> added the comment: I marked bpo-5885 as a duplicate of this issue, even if it's not exactly the same. The main purpose of this issue was to use uuid_generate_time() using a C extension, as bpo-20519.
+static PyObject * +uuid_uuid1(PyObject *self, PyObject *args) +{ + uuid_t out; + uuid_generate_time(out); + return PyByteArray_FromStringAndSize((const char *) out,sizeof(out)); +} +static PyObject * +uuid_uuid4(PyObject *self, PyObject *args) +{ + uuid_t out; + uuid_generate_random(out); + return PyByteArray_FromStringAndSize(out,sizeof(out)); +} ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue11063> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com