Sure, I misread obj_or_enomem before. Though I think we need to set r to None in case it's NULL.