diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceUtil/Random.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceUtil/UUID.cpp | 11 |
2 files changed, 18 insertions, 1 deletions
diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index 4af2e165069..f4f4d30aa95 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -21,6 +21,7 @@ using namespace std; + IceUtil::RandomGeneratorException::RandomGeneratorException(const char* file, int line) : Exception(file, line) { @@ -91,8 +92,11 @@ IceUtil::RandomGeneratorException::ice_throw() const // Used by generateUUID() to get a random sequence and the pid of // current process. // +namespace IceUtil +{ + void -IceUtil::generateRandomAndGetPid(char* buffer, int size, char* pid) +generateRandomAndGetPid(char* buffer, int size, char* pid) { assert(pid); generateRandom(buffer, size); @@ -100,6 +104,8 @@ IceUtil::generateRandomAndGetPid(char* buffer, int size, char* pid) pid[1] = myPid[1]; } +} + void IceUtil::generateRandom(char* buffer, int size) { diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index 169dcf32eef..ffe36ea57ab 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -22,6 +22,17 @@ using namespace std; +namespace IceUtil +{ + +// +// This method is defined in Random.cpp as a convenience for +// generateUUID. +// +void generateRandomAndGetPid(char*, int, char*); + +}; + // Helper char to hex functions // inline void halfByteToHex(unsigned char hb, char*& hexBuffer) |