return rc;
}
-static void destroy_cdbrw_idtabcb(Tcl_Interp *ip, void *rw) {
- rw_close(0,rw);
- TFREE(rw);
+static void destroy_cdbrw_idtabcb(Tcl_Interp *ip, void *rw_v) {
+ rw_close(0,rw_v);
+ TFREE(rw_v);
}
const IdDataSpec cdbtcl_rwdatabases= {
"cdb-rwdb", "cdb-openrwdatabases-table", destroy_cdbrw_idtabcb
else rc= TCL_OK;
if (!rc) {
- if (!rw->logfile) {
+ if (rw->logfile) {
logsz= ftello(rw->logfile);
if (logsz < 0)
rc= cht_posixerr(ip, errno, "ftell logfile during close info");
rc= infocb(ip, rw, "close", "main=%luby log=%luby",
rw->mainsz, logsz);
} else if (reccount>=0) {
- rc= infocb(ip, rw, "close", "main=%luby nrecs=%l", rw->mainsz, reccount);
+ rc= infocb(ip, rw, "close", "main=%luby nrecs=%ld",
+ rw->mainsz, reccount);
} else {
rc= infocb(ip, rw, "close", "main=%luby", rw->mainsz);
}