int Dbc::dup(Dbc** cursorp, u_int32_t flags_arg) { DBC *cursor = this; DBC *new_cursor = 0; int err; if ((err = cursor->c_dup(cursor, &new_cursor, flags_arg)) != 0) { DB_ERROR("Db::dup", err, ON_ERROR_UNKNOWN); return (err); } // The following cast implies that Dbc can be no larger than DBC *cursorp = (Dbc*)new_cursor; return (0); }
int Dbc::dup(Dbc** cursorp, u_int32_t _flags) { int ret; DBC *dbc = this; DBC *new_cursor = 0; ret = dbc->c_dup(dbc, &new_cursor, _flags); if (DB_RETOK_STD(ret)) // The following cast implies that Dbc can be no larger than DBC *cursorp = (Dbc*)new_cursor; else DB_ERROR("Dbc::dup", ret, ON_ERROR_UNKNOWN); return (ret); }