MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / sqlite3_ieee_init

Function sqlite3_ieee_init

modules/dasSQLITE/sqlite/shell.c:4082–4112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4080
4081#endif
4082int sqlite3_ieee_init(
4083 sqlite3 *db,
4084 char **pzErrMsg,
4085 const sqlite3_api_routines *pApi
4086){
4087 static const struct {
4088 char *zFName;
4089 int nArg;
4090 int iAux;
4091 void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
4092 } aFunc[] = {
4093 { "ieee754", 1, 0, ieee754func },
4094 { "ieee754", 2, 0, ieee754func },
4095 { "ieee754_mantissa", 1, 1, ieee754func },
4096 { "ieee754_exponent", 1, 2, ieee754func },
4097 { "ieee754_to_blob", 1, 0, ieee754func_to_blob },
4098 { "ieee754_from_blob", 1, 0, ieee754func_from_blob },
4099
4100 };
4101 unsigned int i;
4102 int rc = SQLITE_OK;
4103 SQLITE_EXTENSION_INIT2(pApi);
4104 (void)pzErrMsg; /* Unused parameter */
4105 for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
4106 rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
4107 SQLITE_UTF8|SQLITE_INNOCUOUS,
4108 (void*)&aFunc[i].iAux,
4109 aFunc[i].xFunc, 0, 0);
4110 }
4111 return rc;
4112}
4113
4114/************************* End ../ext/misc/ieee754.c ********************/
4115/************************* Begin ../ext/misc/series.c ******************/

Callers 1

open_dbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected