I don't why you can't just fetch that info in c_code().  This gives you nothing more.