Skip to content

Commit

Permalink
types.py: Remove duplicated method
Browse files Browse the repository at this point in the history
  • Loading branch information
Adhika Setya Pramudita committed Nov 23, 2017
1 parent 67963b5 commit 3652767
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions viper/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .exceptions import InvalidTypeException
from .utils import (
base_types,
ceil32,
is_varname_valid,
valid_units,
)
Expand Down Expand Up @@ -311,11 +312,6 @@ def parse_type(item, location):
raise InvalidTypeException("Invalid type: %r" % ast.dump(item), item)


# Rounds up to nearest 32, eg. 95 -> 96, 96 -> 96, 97 -> 128
def ceil32(x):
return x + 31 - (x - 1) % 32


# Gets the number of memory or storage keys needed to represent a given type
def get_size_of_type(typ):
if isinstance(typ, BaseType):
Expand Down

0 comments on commit 3652767

Please sign in to comment.