예제 #1
0
 def _find_datamembers(self):
     num_datamembers = capi.c_num_datamembers(self)
     for i in range(num_datamembers):
         if not capi.c_is_publicdata(self, i):
             continue
         datamember_name = capi.c_datamember_name(self, i)
         type_name = capi.c_datamember_type(self, i)
         offset = capi.c_datamember_offset(self, i)
         is_static = bool(capi.c_is_staticdata(self, i))
         datamember = W_CPPDataMember(self.space, self, type_name, offset, is_static)
         self.datamembers[datamember_name] = datamember
예제 #2
0
 def _make_datamember(self, dm_name, dm_idx):
     type_name = capi.c_datamember_type(self, dm_idx)
     offset = capi.c_datamember_offset(self, dm_idx)
     datamember = W_CPPDataMember(self.space, self, type_name, offset, True)
     self.datamembers[dm_name] = datamember
     return datamember