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

Function idxNewConstraint

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

** Allocate and return a new IdxConstraint object. Set the IdxConstraint.zColl ** variable to point to a copy of nul-terminated string zColl. */

Source from the content-addressed store, hash-verified

8652** variable to point to a copy of nul-terminated string zColl.
8653*/
8654static IdxConstraint *idxNewConstraint(int *pRc, const char *zColl){
8655 IdxConstraint *pNew;
8656 int nColl = STRLEN(zColl);
8657
8658 assert( *pRc==SQLITE_OK );
8659 pNew = (IdxConstraint*)idxMalloc(pRc, sizeof(IdxConstraint) * nColl + 1);
8660 if( pNew ){
8661 pNew->zColl = (char*)&pNew[1];
8662 memcpy(pNew->zColl, zColl, nColl+1);
8663 }
8664 return pNew;
8665}
8666
8667/*
8668** An error associated with database handle db has just occurred. Pass

Callers 1

expertBestIndexFunction · 0.85

Calls 1

idxMallocFunction · 0.85

Tested by

no test coverage detected