The official text
Old and new, side by side
Code of Criminal Procedure, 1973
Section 45 Protection of members of the Armed Forces from arrest
(1) Notwithstanding anything contained in sections 41 to 44 (both inclusive), no member of the Armed Forces of the Union shall be arrested for anything done or purported to be done by him in the discharge of his official duties except after obtaining the consent of the Central Government.
(2) The State Government may, by notification, direct that the provisions of sub-section (1) shall apply to such class or category of the members of the Force charged with the maintenance of public order as may be specified therein, wherever they may be serving, and thereupon the provisions of that sub-section shall apply as if for the expression “Central Government” occurring therein, the expression “State Government” were substituted.
Bharatiya Nagarik Suraksha Sanhita, 2023
Section 42 Protection of members of Armed Forces from arrest
(1) Notwithstanding anything contained in section 35 and sections 39 to 41 (both inclusive), no member of the Armed Forces of the Union shall be arrested for anything done or purported to be done by him in the discharge of his official duties except after obtaining the consent of the Central Government.
(2) The State Government may, by notification, direct that the provisions of sub-section (1) shall apply to such class or category of the members of the Force charged with the maintenance of public order as may be specified therein, wherever they may be serving, and thereupon the provisions of that sub-section shall apply as if for the expression “Central Government” occurring therein, the expression “State Government” were substituted.
The texts are India Code’s. The amendment markers and footnotes of the official print are left out, so the old section reads as it stood when it was repealed; State amendments are not shown. The PDFs linked below carry the full history.