Commit Graph

17 Commits

Author SHA1 Message Date
Michael Grunder 6448f735d5
sdsrange overflow fix (#830)
Fix overflow bug in `sdsrange`
2020-06-07 14:38:16 -07:00
Marcus Geelnard 173f16ab55 MSVC: Fix some compiler warnings in sds.h 2019-08-09 11:49:02 +02:00
Marcus Geelnard 85fee25653 MinGW fix: Use _MSC_VER instead of _WIN32 where appropriate
Use _MSC_VER (instead of _WIN32) for things that are specific for
Visual Studio.

Also remove #include <winsock2.h> from hiredis.h, as it leaks too
many symbols and defines into the global namespace, which is
undesirable for a public interface header. Anyone who uses the
the affected parts of the hiredis API needs to include the
appropriate headers anyway in order to declare struct timeval
variables.
2019-08-09 11:49:02 +02:00
jinjiazhang cdb836d5f8 Fix Compile Error On Windows (Visual Studio) 2019-04-13 10:38:34 +08:00
Ali Volkan ATLI f5b32e2474 Update sds.h
Fixing sds.h for building hiredis in cpp project
2016-05-14 23:11:33 +03: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
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 0cacb485fe Fix sds building with C++
These should really just be macros to shut up our type system.
2015-01-05 16:53:22 -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
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
Pieter Noordhuis cd7063e85b Inline sdslen and sdsavail (thanks to @bitbckt) 2011-04-19 22:59:26 +02:00
Pieter Noordhuis fbe756d838 Avoid warnings with -Wstrict-prototypes 2011-01-27 12:50:55 +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