Example #1
0
File: db3.c Project: xrg/RPM
static int db3byteswapped(dbiIndex dbi)	
{
    DB * db = dbi->dbi_db;
    int rc = 0;

    if (db != NULL) {
	int isswapped = 0;
	rc = db->get_byteswapped(db, &isswapped);
	if (rc == 0)
	    rc = isswapped;
    }

    return rc;
}
Example #2
0
/* {{{ rberkeley_db_get_byteswapped */
SEXP rberkeley_db_get_byteswapped (SEXP _dbp)
{
  DB *dbp;
  int ret, isswapped;

  dbp = R_ExternalPtrAddr(_dbp);
  if(R_ExternalPtrTag(_dbp) != RBerkeley_DB || dbp == NULL)
    error("invalid 'db' handle");

  ret = dbp->get_byteswapped(dbp, &isswapped);

  if(ret != 0)
    return ScalarInteger(ret);

  return ScalarInteger(isswapped); 
}
Example #3
0
int Db::get_byteswapped() const
{
	DB *db = (DB *)unwrapConst(this);
	return (db->get_byteswapped(db));
}