INNER CODE UNIT · C++

res

margelo/react-native-bignumber · cpp/MGBigNumberHostObject.cpp:1128

            int res = BN_cmp(thiz->bign, temp);
            BN_free(temp);

            return jsi::Value(runtime, res);
        }));

        this->fields.push_back(HOST_LAMBDA("lt", {
            std::shared_ptr<MGBigNumber> thiz = thisValue.getObject(runtime).getHostObject<MGBigNumber>(runtime);
            const jsi::Value &otherValue = arguments[0];
            if (!otherValue.isObject())
            {
                throw jsi::JSError(runtime, "cmp expects BigNumb");
            }
            jsi::Object otherObject = otherValue.asObject(runtime);
            if (!otherObject.isHostObject<MGBigNumber>(runtime))
            {
                throw jsi::JSError(runtime, "cmp expects BigNumb");
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…