[GSoC 2017] Coding period Week 8 with gopy@CERN-HSF
Hi, all! This post is about what I did for on 8th week of the coding period at Google Summer of Code 2017.
For this week, I worked on cffi: Support unnamed types and pass hi.go. This work is very meaningful for me, my mentors and this project of Google Summer of Code. Because when I contacted my mentors for Google Summer of Code project at the first time, they gave some tutorials and tests to me. And hi.go was a related source file of the test.
So running hi.go
on the CFFI engine means that our task for this summer is being very successful.
Supporting unnamed types is almost same as named type except this type has no name. And for the name of unnamed types, we generate type names based on Cgo name for unnamed types to generate it by Python class.
So my approach was almost same as week 7. I wrote codes for generating for unnamed type’s protocol such as __getitem__
, __setitem__
etc. But one thing I did not implement for CFFI engine is buffer protocols. This should be implemented later.
I submitted my PR and my mentor Sebastien commented about my Go docs and we fixed non-Go styles comment. Finally, the PR was merged. And now CFFI engine successfully supports unnamed types and able to run hi.go.
On the week 9, I worked on cffi: Implement wrapping of functions with slices/arrays of builtin arguments. I will talk about it in the next post.
Thank you.
Happy hacking