[pacman-dev] questions about pmhandle and pmtrans

Xavier shiningxc at gmail.com
Thu Jul 16 05:56:06 EDT 2009


On Thu, Jul 16, 2009 at 11:41 AM, Xavier<shiningxc at gmail.com> wrote:
>
> So what is the preferred way here? Since we use handle->trans or
> handle->db_local in some places, why not everywhere?
>
>

Also it is worth noticing that in many cases, it works this way :
int SYMEXPORT alpm_trans_sysupgrade(int enable_downgrade)
{
....
  return(_alpm_sync_sysupgrade(handle->trans, handle->db_local,
handle->dbs_sync, enable_downgrade));
}

So it is just the public function using the handle.

But why not just renaming _alpm_sync_sysupgrade(handle->trans,
handle->db_local, handle->dbs_sync, enable_downgrade));
to
alpm_trans_sysupgrade(int enable_downgrade)
?

I never understood what was the point of having all public functions
just stupid wrapper to internal ones.


More information about the pacman-dev mailing list