MCPcopy Create free account
hub / github.com/acl-dev/acl / incoper

Method incoper

lib_acl_cpp/src/redis/redis_string.cpp:837–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837bool redis_string::incoper(const char* cmd, const char* key, long long int* n,
838 long long int* result)
839{
840 size_t argc = 2;
841 const char* argv[3];
842 size_t lens[3];
843
844 argv[0] = cmd;
845 lens[0] = strlen(cmd);
846
847 argv[1] = key;
848 lens[1] = strlen(key);
849
850 char buf[INT64_LEN];
851 if (n != NULL) {
852 (void) acl_i64toa(*n, buf, sizeof(buf));
853 argv[2] = buf;
854 lens[2] = strlen(buf);
855 argc++;
856 }
857
858 hash_slot(key);
859 build_request(argc, argv, lens);
860
861 bool success;
862 if (result != NULL) {
863 *result = get_number64(&success);
864 } else {
865 (void) get_number64(&success);
866 }
867 return success;
868}
869
870} // namespace acl
871

Callers

nothing calls this directly

Calls 3

acl_i64toaFunction · 0.85
hash_slotFunction · 0.85
build_requestFunction · 0.50

Tested by

no test coverage detected