pike.git / src / post_modules / Nettle / hash.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/hash.cmod:80:    optflags OPT_TRY_OPTIMIZE;    {    if (!THIS->meta)    Pike_error("Hash not properly initialized.\n");       push_text(THIS->meta->name);    }       /*! @decl int(0..) digest_size(void)    *! -  *! Returns the size of a hash digests. +  *! Returns the size of a hash digest.    */    PIKEFUN int(0..) digest_size()    optflags OPT_TRY_OPTIMIZE;    {    if (!THIS->meta)    Pike_error("Hash not properly initialized.\n");       push_int(THIS->meta->digest_size);    }   
pike.git/src/post_modules/Nettle/hash.cmod:131:       if (!meta)    Pike_error("Hash not properly initialized.\n");    NO_WIDE_STRING(in);       ctx = alloca(meta->context_size);    if(!ctx)    SIMPLE_OUT_OF_MEMORY_ERROR("hash", meta->context_size);       /* Only thread this block for significant data size */ -  if (in->len > THREADS_ALLOW_THRESHOLD) { +  if (in->len > HASH_THREADS_ALLOW_THRESHOLD) {    THREADS_ALLOW();    meta->init(ctx);    meta->update(ctx, in->len, (const uint8_t *)in->str);    THREADS_DISALLOW();    } else {    meta->init(ctx);    meta->update(ctx, in->len, (const uint8_t *)in->str);    }       digest_length = meta->digest_size;
pike.git/src/post_modules/Nettle/hash.cmod:517:    void *ctx = THIS->ctx;    const struct nettle_hash *meta =    GET_META(Pike_fp->current_object);       if (!ctx || !meta)    Pike_error("State not properly initialized.\n");       NO_WIDE_STRING(data);       /* Only thread this block for significant data size */ -  if (data->len > THREADS_ALLOW_THRESHOLD) { +  if (data->len > HASH_THREADS_ALLOW_THRESHOLD) {    THREADS_ALLOW();    meta->update(ctx, data->len, (const uint8_t *)data->str);    THREADS_DISALLOW();    } else {    meta->update(ctx, data->len, (const uint8_t *)data->str);    }       push_object(this_object());    }