| 58 | } |
| 59 | |
| 60 | static inline char sdsReqType(size_t string_size) { |
| 61 | if (string_size < 1<<5) |
| 62 | return SDS_TYPE_5; |
| 63 | if (string_size < 1<<8) |
| 64 | return SDS_TYPE_8; |
| 65 | if (string_size < 1<<16) |
| 66 | return SDS_TYPE_16; |
| 67 | #if (LONG_MAX == LLONG_MAX) |
| 68 | if (string_size < 1ll<<32) |
| 69 | return SDS_TYPE_32; |
| 70 | return SDS_TYPE_64; |
| 71 | #else |
| 72 | return SDS_TYPE_32; |
| 73 | #endif |
| 74 | } |
| 75 | |
| 76 | /* Create a new sds string with the content specified by the 'init' pointer |
| 77 | * and 'initlen'. |
no outgoing calls
no test coverage detected