aboutsummaryrefslogtreecommitdiff
blob: be18ca7faadfa463c40496acb60af874e78a6639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- polybori/include/BooleEnv.h.orig	2010-01-29 09:02:02.000000000 +0000
+++ polybori/include/BooleEnv.h	2010-08-21 07:54:32.094170620 +0000
@@ -37,7 +37,7 @@
 
 // Obey stricter dependence of Sun Studio compiler
 // todo: resolve dependency 
-#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#if 1 // defined(__SUNPRO_C) || defined(__SUNPRO_CC)
 # define PBORI_ENV_RING_NOTINLINED
 #endif
 
@@ -45,7 +45,6 @@
 
 
 class BoolePolyRing;
-extern BoolePolyRing active_ring;
 class CDynamicOrderBase;
 
 /** @class BooleEnv
@@ -122,6 +121,7 @@
   static ring_type& ring();
 #else
   static ring_type& ring() {
+    static BooleEnv::ring_type active_ring(1000, CTypes::lp, false);
     return active_ring;
   }
 #endif
--- polybori/src/BooleEnv.cc.orig	2010-01-29 09:02:02.000000000 +0000
+++ polybori/src/BooleEnv.cc	2010-08-21 07:58:34.678170342 +0000
@@ -42,13 +42,16 @@
 BEGIN_NAMESPACE_PBORI
 
 
-BooleEnv::ring_type active_ring;
+//BooleEnv::ring_type active_ring;
 // Note, direct access via friends, to  active_ring.pOrder and pMgt, because
 // inline doesn't work up to now, because os the undefined type issue.
 
 /// @todo needs inlining!!!
 #ifdef PBORI_ENV_RING_NOTINLINED
-BooleEnv::ring_type& BooleEnv::ring() { return active_ring; }
+BooleEnv::ring_type& BooleEnv::ring() {
+  static BooleEnv::ring_type active_ring(1000, CTypes::lp, false);
+  return active_ring;
+}
 #endif 
 
 BooleEnv::block_iterator 
@@ -77,7 +80,7 @@
 
 BooleEnv::idx_type
 BooleEnv::lastBlockStart() {
-  return active_ring.lastBlockStart();
+  return ring().lastBlockStart();
 }
 
 
@@ -160,7 +163,7 @@
   }
 
 
-void BooleEnv::set(ring_type& theRing) { active_ring = theRing; }
+void BooleEnv::set(ring_type& theRing) { ring() = theRing; }