Same as CreateRawStringObject, can return NULL if allocation fails */
| 151 | |
| 152 | /* Same as CreateRawStringObject, can return NULL if allocation fails */ |
| 153 | robj *tryCreateRawStringObject(const char *ptr, size_t len) { |
| 154 | sds str = sdstrynewlen(ptr,len); |
| 155 | if (!str) return NULL; |
| 156 | return createObject(OBJ_STRING, str); |
| 157 | } |
| 158 | |
| 159 | /* Same as createStringObject, can return NULL if allocation fails */ |
| 160 | robj *tryCreateStringObject(const char *ptr, size_t len) { |
no test coverage detected