Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Side by Side Diff: mojo/public/python/mojo_bindings/serialization.py

Issue 843523002: Delete empty mojo python package, and prefix all python packages with mojo_ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Utility classes for serialization""" 5 """Utility classes for serialization"""
6 6
7 import struct 7 import struct
8 8
9 9
10 # Format of a header for a struct or an array. 10 # Format of a header for a struct or an array.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 needed_padding = NeededPaddingForAlignment(index, size) 184 needed_padding = NeededPaddingForAlignment(index, size)
185 if needed_padding: 185 if needed_padding:
186 codes.append('x' * needed_padding) 186 codes.append('x' * needed_padding)
187 index = index + needed_padding 187 index = index + needed_padding
188 codes.append(code) 188 codes.append(code)
189 index = index + size 189 index = index + size
190 alignment_needed = NeededPaddingForAlignment(index) 190 alignment_needed = NeededPaddingForAlignment(index)
191 if alignment_needed: 191 if alignment_needed:
192 codes.append('x' * alignment_needed) 192 codes.append('x' * alignment_needed)
193 return struct.Struct(''.join(codes)) 193 return struct.Struct(''.join(codes))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698