backup_init method

PtrBackup? backup_init(
  1. PtrSqlite3 pDest,
  2. String zDestName,
  3. PtrSqlite3 pSource,
  4. String zSourceName,
)
inherited

Implementation

PtrBackup? backup_init(
    PtrSqlite3 pDest, String zDestName, PtrSqlite3 pSource, String zSourceName) {
  final zDestNameMeta = zDestName._metaNativeUtf8();
  final ptrZDestName = zDestNameMeta.ptr;
  final zSourceNameMeta = zSourceName._metaNativeUtf8();
  final ptrZSourceName = zSourceNameMeta.ptr;
  try {
    var result = _h_sqlite3_backup_init(pDest, ptrZDestName, pSource, ptrZSourceName);
    return result == ffi.nullptr ? null : result;
  } finally {
    pkgffi.malloc.free(ptrZDestName);
    pkgffi.malloc.free(ptrZSourceName);
  }
}