Deleted Added
sdiff udiff text old ( 12742:a48daf1c7e56 ) new ( 12770:42f6afaab313 )
full compact
1# Copyright (c) 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

402class MetaSimObject(type):
403 # Attributes that can be set only at initialization time
404 init_keywords = {
405 'abstract' : bool,
406 'cxx_class' : str,
407 'cxx_type' : str,
408 'cxx_header' : str,
409 'type' : str,
410 'cxx_extra_bases' : list,
411 'cxx_exports' : list,
412 'cxx_param_exports' : list,
413 }
414 # Attributes that can be set any time
415 keywords = { 'check' : FunctionType }
416
417 # __new__ is called before __init__, and is where the statements

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

729 ]
730 for exp in param_exports:
731 exp.export(code, "%sParams" % cls)
732
733 code(';')
734 code()
735 code.dedent()
736
737 bases = [ cls._base.cxx_class ] + cls.cxx_extra_bases if \
738 cls._base else cls.cxx_extra_bases
739 if bases:
740 base_str = ", ".join(bases)
741 code('py::class_<${{cls.cxx_class}}, ${base_str}, ' \
742 'std::unique_ptr<${{cls.cxx_class}}, py::nodelete>>(' \
743 'm, "${py_class_name}")')
744 else:
745 code('py::class_<${{cls.cxx_class}}, ' \
746 'std::unique_ptr<${{cls.cxx_class}}, py::nodelete>>(' \

--- 836 unchanged lines hidden ---