The rules for determining the competency of witnesses in civil actions are applicable also to criminal actions and proceedings, except as otherwise provided in this Code.
(Enacted 1872.)