News for hackers. Stuff that matters.
Re:Deconstructing "K&R C" by aaronblohowiak on Wednesday January 11, 2012 @02:19AM (#3450792)
Redis strings are actually length prefixed null terminated strings
Re:Deconstructing "K&R C" by tptacek on Wednesday January 11, 2012 @09:15AM (#3451808)
The string data type in the db? Because Redis itself uses char-stars all over the place, with the libc string functions.
Re:Deconstructing "K&R C" by aaronblohowiak on Wednesday January 11, 2012 @12:00PM (#3452537)
Hmm, reading the source it looks like he is using His sds string library, which has Len, size and a asciiz char* member. When last I checked he does pass the char* around (because it is null terminated) but he also sometimes will do pointer math to get back to the sds
Re:Deconstructing "K&R C" by tptacek on Wednesday January 11, 2012 @01:19PM (#3452920)
You're right; I was reacting to the count of char\s+star and snprintf calls, but only fair to chalk Redis up among the packages I have that rely on a high-level string library.