Add const attribute to real functions