Add more cursor and data descriptor code to C module.