Same as CreateRawStringObject, can return NULL if allocation fails */
| 125 | |
| 126 | /* Same as CreateRawStringObject, can return NULL if allocation fails */ |
| 127 | robj *tryCreateRawStringObject(const char *ptr, size_t len) { |
| 128 | sds str = sdstrynewlen(ptr,len); |
| 129 | if (!str) return NULL; |
| 130 | return createObject(OBJ_STRING, str); |
| 131 | } |
| 132 | |
| 133 | /* Same as createStringObject, can return NULL if allocation fails */ |
| 134 | robj *tryCreateStringObject(const char *ptr, size_t len) { |
no test coverage detected