def implementation(self): hash_typename = self.get_hash_typename() hash = self.db.gcpolicy.get_prebuilt_hash(self.obj) assert hash is not None lines = list(self.initializationexpr()) lines.insert(0, "%s = { {" % (cdecl(hash_typename, "_hash_" + self.name, self.is_thread_local()),)) lines.append("}, %s /* hash */ };" % name_signed(hash, self.db)) return lines
def implementation(self): hash_typename = self.get_hash_typename() hash = self.db.gcpolicy.get_prebuilt_hash(self.obj) assert hash is not None lines = list(self.initializationexpr()) lines.insert(0, '%s = { {' % ( cdecl(hash_typename, '_hash_' + self.name, self.is_thread_local()),)) lines.append('}, %s /* hash */ };' % name_signed(hash, self.db)) return lines
def implementation(self): hash_typename = self.get_hash_typename() hash = self.db.gctransformer.get_prebuilt_hash(self.obj) assert hash is not None lines = list(self.initializationexpr()) lines.insert(0, '%s = { {' % ( cdecl(hash_typename, '_hash_' + self.name, self.is_thread_local()),)) lines.append('}, %s /* hash */ };' % name_signed(hash, self.db)) return lines
def forward_declaration(self): T = self.getTYPE() assert self.typename == self.implementationtypename # no array part hash_typename = self.get_hash_typename() hash_offset = self.db.gctransformer.get_hash_offset(T) yield "%s {" % cdecl(hash_typename, "") yield "\tunion {" yield "\t\t%s;" % cdecl(self.implementationtypename, "head") yield "\t\tchar pad[%s];" % name_signed(hash_offset, self.db) yield "\t} u;" yield "\tlong hash;" yield "};" yield "%s;" % (forward_cdecl(hash_typename, "_hash_" + self.name, self.db.standalone, self.is_thread_local()),) yield "#define %s _hash_%s.u.head" % (self.name, self.name)
def forward_declaration(self): T = self.getTYPE() assert self.typename == self.implementationtypename # no array part hash_typename = self.get_hash_typename() hash_offset = self.db.gctransformer.get_hash_offset(T) yield '%s {' % cdecl(hash_typename, '') yield '\tunion {' yield '\t\t%s;' % cdecl(self.implementationtypename, 'head') yield '\t\tchar pad[%s];' % name_signed(hash_offset, self.db) yield '\t} u;' yield '\tlong hash;' yield '};' yield '%s;' % ( forward_cdecl(hash_typename, '_hash_' + self.name, self.db.standalone, self.is_thread_local()),) yield '#define %s _hash_%s.u.head' % (self.name, self.name)