Professor I am working with asked for my code
You seem uncomfortable sharing interim results with  collaborators. That goes against the collaboration spirit and I implore you to share all results. In the future, don't start a collaboration with anyone who you aren't willing to share interim results with.


  I am just afraid this other professor will be using (a modified version of) my code and then not include me on a any manuscript that will be resulting from the code.


You are afraid this other professor will commit academic fraud, steal intellectual property, or both, seemingly without any basis for concern. Again, I implore you to share all results. (Although I think it is unnecessary, you could defend against this other professor by making interim results available online.)



Read the comments, they are excellent.