MCPcopy Create free account
hub / github.com/audacity/audacity / decimalSumInverse

Function decimalSumInverse

lib-src/sqlite/shell.c:5005–5020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5003 decimal_free(pArg);
5004}
5005static void decimalSumInverse(
5006 sqlite3_context *context,
5007 int argc,
5008 sqlite3_value **argv
5009){
5010 Decimal *p;
5011 Decimal *pArg;
5012 UNUSED_PARAMETER(argc);
5013 p = sqlite3_aggregate_context(context, sizeof(*p));
5014 if( p==0 ) return;
5015 if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
5016 pArg = decimal_new(context, argv[0], 0, 0);
5017 if( pArg ) pArg->sign = !pArg->sign;
5018 decimal_add(p, pArg);
5019 decimal_free(pArg);
5020}
5021static void decimalSumValue(sqlite3_context *context){
5022 Decimal *p = sqlite3_aggregate_context(context, 0);
5023 if( p==0 ) return;

Callers

nothing calls this directly

Calls 3

decimal_newFunction · 0.85
decimal_addFunction · 0.85
decimal_freeFunction · 0.85

Tested by

no test coverage detected