appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
555 stars 72 forks source link

lazy init submessages to avoid crashing on cyclic references #71

Closed tburmeister closed 6 years ago

tburmeister commented 7 years ago

Proposed fix for issue #69

tburmeister commented 7 years ago

There's a little more involved here... need to add a bunch of None checks. Still working, but let me know if this approach seems sane.

grgsrs commented 7 years ago

I hope you don't mind, but I added the calls to reset() that I mentioned and also added a check for None in the ClearField method.

tburmeister commented 7 years ago

Excellent, thank you!