update C and C++ pointers