static av_cold int init(AVFilterContext *ctx) { VolumeContext *vol = ctx->priv; vol->fdsp = avpriv_float_dsp_alloc(0); if (!vol->fdsp) return AVERROR(ENOMEM); return set_expr(&vol->volume_pexpr, vol->volume_expr, ctx); }
Assert & test_expr( bool, const char * expr) { return set_expr( expr); }
Assert & test_expr( type val, const char * expr) { BOOST_SMART_ASSERT_print_current_val( *this, val, expr); return set_expr( expr); }
forlet_clause::forlet_clause( static_context* sctx, CompilerCB* ccb, const QueryLoc& loc, flwor_clause::ClauseKind kind, var_expr* varExpr, expr* domainExpr, var_expr* posVarExpr, var_expr* scoreVarExpr, bool isAllowingEmpty, bool lazy) : forletwin_clause(sctx, ccb, loc, kind, varExpr, domainExpr), thePosVarExpr(posVarExpr), theScoreVarExpr(scoreVarExpr), theAllowingEmpty(isAllowingEmpty), theLazyEval(lazy) { if (thePosVarExpr != NULL) thePosVarExpr->set_flwor_clause(this); if (theScoreVarExpr != NULL) theScoreVarExpr->set_flwor_clause(this); if (varExpr != NULL && sctx != NULL) { RootTypeManager& rtm = GENV_TYPESYSTEM; TypeManager* tm = sctx->get_typemanager(); xqtref_t declaredType = varExpr->get_type(); if (declaredType != NULL) { if (kind == flwor_clause::for_clause && declaredType->is_empty()) { RAISE_ERROR(err::XPTY0004, loc, ERROR_PARAMS(ZED(BadType_23o), "empty-sequence")); } xqtref_t domainType = domainExpr->get_return_type(); if (!TypeOps::is_equal(tm, *rtm.ITEM_TYPE_STAR, *declaredType, loc)) { if (kind == flwor_clause::for_clause) { SequenceType::Quantifier domQuant = domainType->get_quantifier(); SequenceType::Quantifier declQuant = declaredType->get_quantifier(); if (theAllowingEmpty && (declQuant == SequenceType::QUANT_ONE || declQuant == SequenceType::QUANT_PLUS)) { declaredType = tm->create_type(*declaredType, SequenceType::QUANT_PLUS); } else { declaredType = tm->create_type(*declaredType, domQuant); } } if (!TypeOps::is_subtype(tm, *domainType, *declaredType, loc)) { xqtref_t varType = TypeOps::intersect_type(*domainType, *declaredType, tm); if (TypeOps::is_equal(tm, *varType, *rtm.NONE_TYPE, loc)) { RAISE_ERROR(err::XPTY0004, loc, ERROR_PARAMS(ZED(BadType_23o), *domainType, ZED(NoTreatAs_4), *declaredType)); } domainExpr = theCCB->theEM-> create_treat_expr(sctx, domainExpr->get_udf(), loc, domainExpr, declaredType, TREAT_TYPE_MATCH); set_expr(domainExpr); } } } } }
static av_cold int init(AVFilterContext *ctx) { VolumeContext *vol = ctx->priv; return set_expr(&vol->volume_pexpr, vol->volume_expr, ctx); }
/** * @brief Object constructor * * @param[in] expr the filter expression * * @param[in] icase true to ignore case on filtering, false otherwise * * @param[in] mode true to create a symbol filter, false to filter modules * * @throws csdbg::exception */ filter::filter(const i8 *expr, bool icase, bool mode): m_mode(mode) { util::memset(&m_expr, 0, sizeof(regex_t)); set_expr(expr, icase); }