def serialize_arguments(self): buf = "" buf += chr(self.debug_type) buf += u32(self.index) buf += chr(self.reg) buf += u32(self.extra) return buf
def utf8(string): try: string = unicode(string, "latin-1") except TypeError: pass string = string.encode("utf8") return u32(len(string)) + string
def serialize_arguments(self): return ''.join(u32(i) for i in self.arguments)
def write_pool(pool, fn): return u32(len(pool)) + ''.join(fn(i) for i in pool)
def serialize(self): code = [chr(self.kind)] code.append(u32(self._name_index)) code.append(u32(len(self._types_indices))) code.extend(u32(a) for a in self._types_indices) return ''.join(code)
def serialize(self): return chr(self.kind) + u32(self._name_index)
def serialize(self): return chr(self.kind) + u32(self._ns_set_index)
def serialize_arguments(self): return u32(self._multiname_index) + u32(self.num_args)
def serialize_arguments(self): cases = "\0\0\0"*len(self.case_labels) return "\0\0\0%s%s" % (u32(len(self.case_labels) - 1), cases)
def serialize_arguments(self): return u32(self._arg_index)
def serialize_arguments(self): cases = "\0\0\0" * len(self.case_labels) return "\0\0\0%s%s" % (u32(len(self.case_labels) - 1), cases)
def serialize(self): return u32(len(self.ns)) + ''.join(u32(index) for index in self._ns_indices)