Commit Graph

21 Commits

Author SHA1 Message Date
Jan-Erik Rediger
8636d90821 Avoid unchecked malloc
Closes #471
2016-12-09 10:51:26 +01:00
charsyam
f51fdfb7af remove unnessory code 2016-04-20 23:49:42 +09:00
charsyam
921e1aa84b remove unused code 2016-04-20 23:15:41 +09:00
Jan-Erik Rediger
63e1cf0c63 feat: Include latests changes from sds upstream 2016-04-20 15:27:38 +02:00
clark.kang
d76e13b6d5 apply sds from redis 2016-04-20 15:27:11 +02:00
charsyam
e2f6ee239c fixing typos 2015-10-28 02:19:24 +09:00
tzickel
ec229678c2 Added support for compiling the parser code with Microsoft Visual C compiler.
For hiredis-py and others support on windows.
2015-03-13 15:58:23 +02:00
Matt Stancliff
f28872ca70 Cleanup tabs and end of line whitespace 2015-01-05 16:53:23 -05:00
michael-grunder
40f7035ba4 Improve redisAppendCommandArgv performance
OK, perhaps the second time is a charm.  I forgot that I had
hiredis forked from a long time ago, so the initial pull
request was hosed.  :)

* Pulled in sdscatfmt() from Redis, and modified it to accept a
  size_t (%T) style format specifier.

* Pulled in sdsll2str() and sdsull2str() from Redis (needed by
  sdscatfmt).

* Added a new method, redisFormatSdsCommandArgv() which takes
  and sds* as the target, rather than char* (and uses sdscatfmt
  instead of sprintf for the construction).

I get roughly the following improvement:

Old: 1.044806
New: 0.481620

The benchmark code itself can be found here:
https://gist.github.com/michael-grunder/c92ef31bb632b3d0ad81

Closes #260
2015-01-05 11:21:38 -05:00
Gary Grossman
2d814b8da3 Fix minor comment problems
"sdscatpritf" -> "sdscatprintf"
Example used sdsempty("text") but should say sdsnew("text")

Closes #282
2015-01-05 11:21:38 -05:00
antirez
334525359a Upgrade sds to latest version
SDS is now broken out of Redis into its own project, so include
the latest version from the SDS repo.

This is a backport of the Redis commit doing the same to the bundled hiredis:
320fa02b9b
2014-04-09 17:02:42 -04:00
Charlie Somerville
81c95a5fd3 sds.c: avoid leaking tokens when seplen < 1 || len < 0 2014-01-15 11:38:02 +11:00
Richard Fuchs
b15650e13a va_copy must be followed by va_end 2013-07-02 12:41:13 -04:00
Pieter Noordhuis
ebb690ea99 Fix sdscatrepr 2011-04-21 21:02:04 +02:00
Pieter Noordhuis
ac9fb4993b Don't abort on OOM in sds.c 2011-04-21 18:37:43 +02:00
Pieter Noordhuis
cd7063e85b Inline sdslen and sdsavail (thanks to @bitbckt) 2011-04-19 22:59:26 +02:00
Pieter Noordhuis
5962a2de17 Add testhelp.h inline in sds.c 2011-01-19 13:41:31 +01:00
Pieter Noordhuis
7aa5fa102e Update string library 2011-01-19 13:41:25 +01:00
Pieter Noordhuis
3253105d49 Update sds code 2010-09-20 13:19:13 +02:00
Pierre Riteau
4693a51707 Constify the API and enable -Wwrite-strings
The API is more similar to printf now.
2010-05-25 14:02:14 +02:00
antirez
4f6fc6dfb1 hiredis was extracted from redis-tools, reverted to standard malloc/free, ported to the new protocol, and started as a stand alone project in order to support the need of a C client in the Redis community 2010-05-18 17:11:09 +02:00