params.py (3179:c86dfc93984b) params.py (3584:8c3cdb2c001c)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 355 unchanged lines hidden (view full) ---

364 if isinstance(value, Addr):
365 self.value = value.value
366 else:
367 try:
368 self.value = convert.toMemorySize(value)
369 except TypeError:
370 self.value = long(value)
371 self._check()
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 355 unchanged lines hidden (view full) ---

364 if isinstance(value, Addr):
365 self.value = value.value
366 else:
367 try:
368 self.value = convert.toMemorySize(value)
369 except TypeError:
370 self.value = long(value)
371 self._check()
372 def __add__(self, other):
373 if isinstance(other, Addr):
374 return self.value + other.value
375 else:
376 return self.value + other
372
373
374class MetaRange(type):
375 def __init__(cls, name, bases, dict):
376 super(MetaRange, cls).__init__(name, bases, dict)
377 if name == 'Range':
378 return
379 cls.cxx_type = 'Range< %s >' % cls.type.cxx_type

--- 589 unchanged lines hidden ---
377
378
379class MetaRange(type):
380 def __init__(cls, name, bases, dict):
381 super(MetaRange, cls).__init__(name, bases, dict)
382 if name == 'Range':
383 return
384 cls.cxx_type = 'Range< %s >' % cls.type.cxx_type

--- 589 unchanged lines hidden ---