45 Commits

Author SHA1 Message Date
lericson
53879eb8a9 First pass of syntax & indent nitpick 2010-05-11 11:47:14 +02:00
lericson
e8593ba7c7 Always terminate Py_*_ALLOW_THREADS with semicolon 2010-05-10 13:52:51 +02:00
lericson
76d422cc0f Fix what seems to be merge-related issues 2010-05-10 13:24:07 +02:00
lericson
2ff9e471c2 Zero out mset memory in one fell swoop 2010-05-10 13:23:20 +02:00
ketralnis
eb21e83e2c Acquire/release the GIL only once for set_multi operations, and add add_multi/incr_multi operations 2010-05-10 13:11:13 +02:00
ketralnis
4674638327 A second pass at releasing the GIL during blocking operations: only release/reaquire once for a get_multi operation 2010-05-10 13:11:10 +02:00
lericson
6687cc0464 Add some function names to arg parsing lines 2010-05-10 12:44:15 +02:00
lericson
f88c8c3afe Stop accepting time argument for delete. Fixes #1 2010-05-10 12:42:46 +02:00
lericson
5c059a0ccd Use snprintf to avoid nonsensical Clang warnings 2010-05-10 12:20:14 +02:00
lericson
fcfe08f3c3 Merge remote branch 'ketralnis/master' 2010-03-27 20:07:55 +01:00
ketralnis
84875a0c6a First pass at freeing the GIL during blocking calls 2010-03-22 21:15:38 -07:00
lericson
92c1fbb585 Fix up docstrings for pylibmc module 2010-03-22 21:52:09 +01:00
lericson
61932d50b9 Check for minor version requirement 2010-03-22 21:06:37 +01:00
lericson
3331c59d77 Elusive is the one missing DECREF, conclusive is this commit.
Fixes #6 - the issue was that when PyTuple_Pack constructs a tuple, it
makes a reference of its own. This was not taken into account, so a
DECREF was missing.
2010-03-16 19:59:17 +01:00
lericson
c3215866c5 Fix get_multi with an 0-sequence.
Used to give weird errors like NULL return w/o exception etc. Fixes #7.
2010-02-22 16:36:56 +01:00
lericson
aff42d767b Check for mappings in delete_multi and err out.
Previously, this would cause internal trickery to go wrong and call an
inner function with too many arguments, then fail. The error wouldn't
bubble up either, and a SEGV would ensue.
2010-01-27 11:41:07 +01:00
lericson
b7d381a160 Make delete_multi return value compatible with python-memcached. 2009-12-13 21:00:39 +01:00
lericson
69f53cb0c1 Remove accidentally left-over debug prints 2009-11-30 10:35:19 +01:00
lericson
c5590258fb Implement zlib compression. 2009-11-30 10:29:36 +01:00
lericson
9fec8f59f6 Fix crashes in client allocation and deallocation routines. 2009-11-30 09:15:27 +01:00
lericson
43729b93a8 Raise exception when no servers are given. 2009-11-18 20:25:03 +01:00
lericson
40dcb628c6 Expose all per-error exception objects. 2009-11-17 17:52:39 +01:00
lericson
1c83ad0de2 Add specialized exception classes.
Useful when you need to catch certain errors like when a key isn't found
during an increment/decrement operation.
2009-11-05 19:09:09 +01:00
lericson
343286a34b Fix empty memcached value exception bug.
pylibmc would produce non-error exceptions because the memcached value
pointer would be NULL, while the return code would be zero.
2009-10-31 11:22:18 +01:00
lericson
0984a270db Added get_stats function.
Thanks to M0shTH8 for inspiration.
2009-10-19 14:09:08 +02:00
lericson
16e964e571 Add support for the binary protocol.
Also removed two behaviors from public exposure as they're better off
controlled by `_pylibmc`. (USE_UDP and BINARY_PROTOCOL.)
2009-09-21 17:16:43 +02:00
lericson
7b2f9f88dd Simplify behavior setting method. 2009-09-21 16:47:16 +02:00
lericson
a14a2d7de9 Improve error checking for adding servers. 2009-09-21 16:43:00 +02:00
lericson
aa74c13d84 Improve error checking for increment and decrement. 2009-09-21 16:42:37 +02:00
lericson
a634ed7140 Cast keys to const in get_multi.
This is because libmemcached 0.32 wants it that way.
2009-09-21 15:46:06 +02:00
lericson
bc40569572 Add memcached_clone support. 2009-09-19 22:45:42 +02:00
lericson
e8817b6617 Set version in one file and one file alone. 2009-09-19 21:42:37 +02:00
lericson
9fb94c12c0 Properly cast types in get_behaviors. 2009-09-18 11:23:25 +02:00
lericson
391878b095 Simplify set_behaviors. 2009-09-18 11:22:54 +02:00
lericson
732f181cb7 Add tests for pickling. 2009-09-08 21:43:56 +02:00
lericson
ab407b51c7 Handle errors in bool value parsing better. 2009-09-08 16:15:49 +02:00
lericson
f567323f04 Use Py_ssize_t as much as possible.
This fixes issues with x86_64 builds, which would cause very strange
errors to occur.
2009-09-07 23:55:37 +02:00
lericson
2c4d9acb3b Fix an obvious memory leak 2009-09-07 02:22:55 +02:00
lericson
3c7fc65e38 Rework flow of set, replace et al.
This should make it easier to read as usual, but should also fix a
potential memory leak.
2009-09-07 02:19:31 +02:00
lericson
c023d18a20 Rework flow of multi_get.
This should fix some corner-case bugs, and makes the code read a lot
better.
2009-09-06 01:34:15 +02:00
lericson
c3d46783d3 Properly set error on success status. 2009-09-05 17:34:26 +02:00
lericson
4991469ef9 Remove nonsensical cast to same type. 2009-09-05 17:33:22 +02:00
lericson
5ebad6db14 Fix early DECREF 2009-09-05 02:12:11 +02:00
lericson
5fd68b34c7 Merge patch from amix
Add support for bool values, use ssize_t in some places (not sure about
this) and some other stuff.
2009-09-05 02:08:04 +02:00
lericson
4e68248105 Initial import into git! 2009-07-27 16:10:43 +02:00