Always terminate Py_*_ALLOW_THREADS with semicolon

This commit is contained in:
lericson 2010-05-10 13:52:51 +02:00
parent 2f09c230a3
commit e8593ba7c7

View File

@ -749,7 +749,7 @@ static bool _PylibMC_RunSetCommand(PylibMC_Client* self,
} /* for */ } /* for */
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS;
/* we only return the last return value, even for a _multi /* we only return the last return value, even for a _multi
operation, but we do set the success on the mset */ operation, but we do set the success on the mset */
@ -1009,7 +1009,7 @@ static bool _PylibMC_IncrDecr(PylibMC_Client *self, pylibmc_incr *incrs,
_PylibMC_IncrCommand f = NULL; _PylibMC_IncrCommand f = NULL;
size_t i; size_t i;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS;
for(i = 0; i < nkeys && !error; i++) { for(i = 0; i < nkeys && !error; i++) {
pylibmc_incr *incr = &incrs[i]; pylibmc_incr *incr = &incrs[i];
uint64_t result = 0; uint64_t result = 0;
@ -1021,7 +1021,7 @@ static bool _PylibMC_IncrDecr(PylibMC_Client *self, pylibmc_incr *incrs,
error = true; error = true;
} }
} }
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS;
if(error) { if(error) {
char *fname = (f == memcached_decrement) ? "memcached_decrement" char *fname = (f == memcached_decrement) ? "memcached_decrement"
@ -1179,13 +1179,13 @@ static PyObject *PylibMC_Client_get_multi(PylibMC_Client *self, PyObject *args,
* the data at once isn't needed. (Should probably look into if it's even * the data at once isn't needed. (Should probably look into if it's even
* worth it.) * worth it.)
*/ */
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS;
rc = pylibmc_memcached_fetch_multi(self->mc, rc = pylibmc_memcached_fetch_multi(self->mc,
keys, nkeys, key_lens, keys, nkeys, key_lens,
results, results,
&nresults, &nresults,
err_func); err_func);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS;
if(rc != MEMCACHED_SUCCESS) { if(rc != MEMCACHED_SUCCESS) {
PylibMC_ErrFromMemcached(self, *err_func, rc); PylibMC_ErrFromMemcached(self, *err_func, rc);