~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSGlobal.h

Possible fix for hudson not finding version_ms.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
                                                                (self)->relTop++; \
157
157
                                                        } while (0)
158
158
 
 
159
#define push_ptr(r)                     do { \
 
160
                                                                if ((self)->relTop >= (self)->relStack + CS_RELEASE_STACK_SIZE) {\
 
161
                                                                        CSException::throwCoreError(CS_CONTEXT, CS_ERR_RELEASE_OVERFLOW); \
 
162
                                                                } \
 
163
                                                                (self)->relTop->r_type = CS_RELEASE_MEM; \
 
164
                                                                (self)->relTop->x.r_mem = (r); \
 
165
                                                                (self)->relTop++; \
 
166
                                                        } while (0)
 
167
 
159
168
#define pop_(r)                         do { \
160
169
                                                                ASSERT((self)->relTop > (self)->relStack); \
161
170
                                                                if (((self)->relTop - 1)->r_type == CS_RELEASE_OBJECT) {\
162
171
                                                                        ASSERT(((self)->relTop - 1)->x.r_object == ((CSObject *) r)); \
163
172
                                                                } else if (((self)->relTop - 1)->r_type == CS_RELEASE_MUTEX) {\
164
173
                                                                        ASSERT(((self)->relTop - 1)->x.r_mutex == ((CSMutex *) r)); \
165
 
                                                                } else {\
 
174
                                                                } else if (((self)->relTop - 1)->r_type == CS_RELEASE_POOLED) {\
166
175
                                                                        ASSERT(((self)->relTop - 1)->x.r_pooled == ((CSPooled *) r)); \
 
176
                                                                } else if (((self)->relTop - 1)->r_type == CS_RELEASE_MEM) {\
 
177
                                                                        ASSERT(((self)->relTop - 1)->x.r_mem == ((CSPooled *) r)); \
 
178
                                                                }  else {\
 
179
                                                                        ASSERT(false); \
167
180
                                                                } \
168
181
                                                                (self)->relTop--; \
169
182
                                                        } while (0)
174
187
                                                        } while (0)
175
188
 
176
189
#define release_(r)                     do {  \
177
 
                                                                register CSObject *rp; \
178
190
                                                                ASSERT((self)->relTop > (self)->relStack); \
179
 
                                                                ASSERT(((self)->relTop - 1)->r_type == CS_RELEASE_OBJECT); \
180
 
                                                                rp = ((self)->relTop - 1)->x.r_object; \
181
 
                                                                ASSERT(rp == (r)); \
182
 
                                                                (self)->relTop--; \
183
 
                                                                rp->release(); \
 
191
                                                                if (((self)->relTop - 1)->r_type == CS_RELEASE_OBJECT) {\
 
192
                                                                        register CSObject *rp; \
 
193
                                                                        rp = ((self)->relTop - 1)->x.r_object; \
 
194
                                                                        ASSERT(rp == (r)); \
 
195
                                                                        (self)->relTop--; \
 
196
                                                                        rp->release(); \
 
197
                                                                } else if (((self)->relTop - 1)->r_type == CS_RELEASE_MEM) {\
 
198
                                                                        register void *mem; \
 
199
                                                                        mem = ((self)->relTop - 1)->x.r_mem; \
 
200
                                                                        ASSERT(mem == (r)); \
 
201
                                                                        (self)->relTop--; \
 
202
                                                                        cs_free(mem); \
 
203
                                                                }  else {\
 
204
                                                                        ASSERT(false); \
 
205
                                                                } \
184
206
                                                        } while (0)
185
207
 
186
208
#define lock_(r)                        do { \