Subversion Repositories freemyipod

Rev

Rev 505 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 505 Rev 510
Line 186... Line 186...
186
        for field, _ in self._fields_:
186
        for field, _ in self._fields_:
187
            if field in bunch:
187
            if field in bunch:
188
                setattr(self, field, getattr(bunch, field))
188
                setattr(self, field, getattr(bunch, field))
189
    
189
    
190
    def _to_bunch(self):
190
    def _to_bunch(self):
-
 
191
        bunch = Bunch()
-
 
192
        for field, _ in self._fields_:
191
        return Bunch(**{field: getattr(self, field) for field, _ in self._fields_})
193
            setattr(bunch, field, getattr(self, field))
-
 
194
        return bunch
192
    
195
    
193
    def _from_string(self, string):
196
    def _from_string(self, string):
194
        memmove(addressof(self), string, sizeof(self))
197
        memmove(addressof(self), string, sizeof(self))
195
    
198
    
196
    def _to_string(self):
199
    def _to_string(self):