Commit Graph

941 Commits

Author SHA1 Message Date
Pieter Noordhuis
2796f6da7b added rdb save function to directly save long long values 2010-05-31 22:26:25 +02:00
Pieter Noordhuis
0f62e1775d update RPOPLPUSH to support dual encoding 2010-05-31 20:47:39 +02:00
Pieter Noordhuis
be02a7c0d6 update list iteration semantic to work as expected (i.e. "while(lNext(..))") 2010-05-31 20:25:31 +02:00
Pieter Noordhuis
6a8e35ad92 ziplistDelete no longer needs a direction now ziplistPrev is fixed 2010-05-31 20:18:35 +02:00
Pieter Noordhuis
8632fb3040 ziplistPrev should return the tail when the argument is ZIP_END 2010-05-31 20:17:21 +02:00
Pieter Noordhuis
3fbf9001ce fix LREM to remove *all* occurances when a zero argument is given 2010-05-30 03:25:14 +02:00
Pieter Noordhuis
bd8db0ada8 fixed LINDEX to always return bulk response 2010-05-30 03:25:04 +02:00
Pieter Noordhuis
dbaa41c618 the tail offset must be an integer pointer to hold a 32-bit offset 2010-05-30 03:06:12 +02:00
Pieter Noordhuis
d2ee16abec update LREM to support dual encoding via extra iteration primitives 2010-05-30 02:17:36 +02:00
Pieter Noordhuis
9ae6b0be4a support dual encoding in LTRIM 2010-05-30 02:16:12 +02:00
Pieter Noordhuis
a6dd455b09 update LRANGE to use basic iteration code to support dual encoding 2010-05-30 02:15:34 +02:00
Pieter Noordhuis
697bd5673f inline support for dual encoding in the LINDEX and LSET commands 2010-05-30 02:11:59 +02:00
Pieter Noordhuis
d72562f7ba generic pop and length function for ziplist encoding 2010-05-30 01:51:55 +02:00
Pieter Noordhuis
c7d9d662a4 generic push function that supports the dual encoding 2010-05-30 01:46:59 +02:00
Pieter Noordhuis
0f3dfa87bc change delete function to accept a direction argument, so "p" can be properly updated 2010-05-30 01:39:41 +02:00
Pieter Noordhuis
033fb554be expose extra functionality from ziplist.c 2010-05-30 01:38:56 +02:00
Pieter Noordhuis
177a0a0b0d code style consistency fixes 2010-05-30 01:37:03 +02:00
Pieter Noordhuis
c03206fdf1 ziplistIndex now accepts negative indices 2010-05-29 22:17:16 +02:00
Pieter Noordhuis
a24ba809d1 fix compile warnings 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
7b1f85c0a2 use simpler encoding for the length of the previous entry 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
1ce81fa59b replace functions to get pointers to head and tail by macros 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
6435c76772 function to insert an element at an arbitrary position in the list 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
0c0d056412 extract a generic delete function that can be used in pop and delete(range) 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
bb57b965c4 use the entry struct in zipRawEntryLength 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
03e52931dd rename argument names to s* to disambiguate from e* 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
c8d9e7f4c0 change ziplistRepr to use the entry struct 2010-05-29 21:10:17 +02:00
Pieter Noordhuis
d593c48869 modify compare function to check if the encoding is equal before comparing 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
a5456b2cb6 use a struct to retrieve all details for an entry 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
dcb9cf4e82 initial implementation for making the ziplist doubly linked 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
fc2c0f7a6c fix some warnings 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
4812cf2873 add function to retrieve ziplist size in bytes 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
c4aace9003 fix compare function of ziplist to only load integer from ziplist when it is encoded as integer 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
6205b46387 add function to retrieve length of ziplist 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
aa549962a4 re-introduce ZIP_BIGLEN for clarity 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
c7019f7019 added header ziplist.h 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
c09c2c3b04 code to compare strings with entries in ziplist, regardless of their encoding 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
75d8978e7a updated iteration code to work well with different encodings 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
37fff074a2 move code from zip.c to ziplist.c 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
af5f66fb98 partial revert of c80df5 because ziplist functions are starting to divert too much from zipmap functions 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
29b14d5fac initial work for integer encoding in ziplists 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
f6eb17477a move length housekeeping to a macro 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
0f10458c4f allow entries to be deleted in place when iterating over a ziplist 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
924727d905 allow pointer to be stored to current element when iterating over ziplist 2010-05-29 21:10:16 +02:00
Pieter Noordhuis
ba5b4bde21 rename ziplistDelete to ziplistDeleteRange 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
779deb60f9 code to delete an inner range from the ziplist 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
33c1269efc check if *value is non-NULL before setting it 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
335d16bc0f change iteration code to avoid allocating a new sds for each traversed entry 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
08253bf42b code to iterate over a ziplist 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
11ac6ff613 implementation for a ziplist with push and pop support 2010-05-29 21:10:15 +02:00
Pieter Noordhuis
3d04d29e7f extracted general methods to zip.c for reuse in other zip* structures 2010-05-29 21:10:15 +02:00