Merge branch '0.5.0.x' into 0.5.x
authorLuke Dashjr <luke-jr+git@utopios.org>
Fri, 17 Feb 2012 14:40:00 +0000 (09:40 -0500)
committerLuke Dashjr <luke-jr+git@utopios.org>
Fri, 17 Feb 2012 14:40:00 +0000 (09:40 -0500)
1  2 
src/bitcoinrpc.cpp
src/util.h

Simple merge
diff --cc src/util.h
@@@ -255,9 -249,20 +255,15 @@@ public
      }
  };
  
 -// WARNING: This will catch continue and break!
 -// break is caught with an assertion, but there's no way to detect continue.
 -// I'd rather be careful than suffer the other more error prone syntax.
 -// The compiler will optimise away all this loop junk.
  #define CRITICAL_BLOCK(cs)     \
 -    for (bool fcriticalblockonce=true; fcriticalblockonce; assert(("break caught by CRITICAL_BLOCK!" && !fcriticalblockonce)), fcriticalblockonce=false) \
 -        for (CCriticalBlock criticalblock(cs, #cs, __FILE__, __LINE__); fcriticalblockonce; fcriticalblockonce=false)
 +    if (CCriticalBlock criticalblock = CCriticalBlock(cs, #cs, __FILE__, __LINE__))
  
+ #define ENTER_CRITICAL_SECTION(cs) \
+     (cs).Enter(#cs, __FILE__, __LINE__)
+ #define LEAVE_CRITICAL_SECTION(cs) \
+     (cs).Leave()
  class CTryCriticalBlock
  {
  protected: