diff options
| author | Gordon Sim <gsim@apache.org> | 2010-01-15 15:17:01 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-01-15 15:17:01 +0000 |
| commit | 8e1f647a10024492e09a689e61128eb5f42c561e (patch) | |
| tree | 139169bc5eab35ab62d9c30f8009f4565603a50a /cpp/src/qpid/sys | |
| parent | 8455ba0b116208f47ce238b384d4af274fa0edb6 (diff) | |
| download | qpid-python-8e1f647a10024492e09a689e61128eb5f42c561e.tar.gz | |
QPID-2323: add a Uuid type and allow it as the value of a Variant.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
| -rw-r--r-- | cpp/src/qpid/sys/windows/uuid.cpp | 3 | ||||
| -rw-r--r-- | cpp/src/qpid/sys/windows/uuid.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/windows/uuid.cpp b/cpp/src/qpid/sys/windows/uuid.cpp index 6ff3a3cb8a..af202d60b6 100644 --- a/cpp/src/qpid/sys/windows/uuid.cpp +++ b/cpp/src/qpid/sys/windows/uuid.cpp @@ -57,3 +57,6 @@ void uuid_unparse (const uuid_t uu, char *out) { } } +int uuid_compare (const uuid_t a, const uuid_t b) { + return memcmp(a, b, qpid::sys::UuidSize) == 0; +} diff --git a/cpp/src/qpid/sys/windows/uuid.h b/cpp/src/qpid/sys/windows/uuid.h index c79abe95c6..249c534b91 100644 --- a/cpp/src/qpid/sys/windows/uuid.h +++ b/cpp/src/qpid/sys/windows/uuid.h @@ -34,5 +34,6 @@ QPID_COMMON_EXTERN void uuid_generate (uuid_t out); QPID_COMMON_EXTERN int uuid_is_null (const uuid_t uu); // Returns 1 if null, else 0 QPID_COMMON_EXTERN int uuid_parse (const char *in, uuid_t uu); // Returns 0 on success, else -1 QPID_COMMON_EXTERN void uuid_unparse (const uuid_t uu, char *out); +QPID_COMMON_EXTERN void uuid_compare (const uuid_t a, const uuid_t b); #endif /*!_sys_windows_uuid_h*/ |
