[asterisk-scf-commits] asterisk-scf/release/ice-util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri May 6 11:18:38 CDT 2011


branch "master" has been updated
       via  472012429c1bdd80f46537914bc422e37fb374af (commit)
      from  dc4d62e50227c64b90fec7aff70680efd7e6c27b (commit)

Summary of changes:
 ThreadPool/src/ThreadPool.cpp      |    6 +++---
 ThreadPool/test/TestThreadPool.cpp |   10 +++++-----
 WorkQueue/test/TestWorkQueue.cpp   |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit 472012429c1bdd80f46537914bc422e37fb374af
Author: David M. Lee <dlee at digium.com>
Date:   Fri May 6 11:17:41 2011 -0500

    More long-instead-of-int changes.
    
    ints weren't large enough to hold size_t for 64-bit systems.

diff --git a/ThreadPool/src/ThreadPool.cpp b/ThreadPool/src/ThreadPool.cpp
index a8cfbfa..5ed3c76 100644
--- a/ThreadPool/src/ThreadPool.cpp
+++ b/ThreadPool/src/ThreadPool.cpp
@@ -91,9 +91,9 @@ public:
 
     void sendStateChanged()
     {
-        int activeSize = mActiveThreads.size();
-        int idleSize = mIdleThreads.size();
-        int zombieSize = mZombieThreads.size();
+        size_t activeSize = mActiveThreads.size();
+        size_t idleSize = mIdleThreads.size();
+        size_t zombieSize = mZombieThreads.size();
         mListener->stateChanged(this, activeSize, idleSize, zombieSize);
     }
 
diff --git a/ThreadPool/test/TestThreadPool.cpp b/ThreadPool/test/TestThreadPool.cpp
index 49530c4..8f2c2d7 100644
--- a/ThreadPool/test/TestThreadPool.cpp
+++ b/ThreadPool/test/TestThreadPool.cpp
@@ -33,7 +33,7 @@ public:
     TestListener() : mActive(0), mIdle(0), mZombie(0), mTasks(0), 
         mWorkAddedNotice(false), mWasEmpty(false), mEmptyNotice(false) { }
     
-    void stateChanged(const PoolPtr&, int active, int idle, int zombie)
+    void stateChanged(const PoolPtr&, Ice::Long active, Ice::Long idle, Ice::Long zombie)
     {
         boost::unique_lock<boost::mutex> lock(mLock);
         mActive = active;
@@ -57,10 +57,10 @@ public:
         mEmptyNotice = true;
     }
 
-    int mActive;
-    int mIdle;
-    int mZombie;
-    int mTasks;
+    Ice::Long mActive;
+    Ice::Long mIdle;
+    Ice::Long mZombie;
+    Ice::Long mTasks;
 
     bool mWorkAddedNotice;
     bool mWasEmpty;
diff --git a/WorkQueue/test/TestWorkQueue.cpp b/WorkQueue/test/TestWorkQueue.cpp
index b0d6b0d..08a9cea 100644
--- a/WorkQueue/test/TestWorkQueue.cpp
+++ b/WorkQueue/test/TestWorkQueue.cpp
@@ -48,7 +48,7 @@ public:
         BOOST_FAIL("workResumable called from a Queue?!");
     }
 
-    int tasksAdded;
+    Ice::Long tasksAdded;
     bool addedNotice;
     bool addedEmptyNotice;
     bool emptyNotice;

-----------------------------------------------------------------------


-- 
asterisk-scf/release/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list