Func.py (9219:258753d3bc47) Func.py (9271:3859f5d4f2c6)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

79 if "return_by_ref" in self and self.return_type != void_type:
80 return_type += "&"
81 if "return_by_pointer" in self and self.return_type != void_type:
82 return_type += "*"
83
84 if self.isInternalMachineFunc:
85 klass = "%s_Controller" % self.machineStr
86 else:
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

79 if "return_by_ref" in self and self.return_type != void_type:
80 return_type += "&"
81 if "return_by_pointer" in self and self.return_type != void_type:
82 return_type += "*"
83
84 if self.isInternalMachineFunc:
85 klass = "%s_Controller" % self.machineStr
86 else:
87 klass = "Chip"
87 self.error("No class found for the function %s" % self.ident)
88
89 params = ', '.join(self.param_strings)
90
91 code('''
92$return_type
93${klass}::${{self.c_ident}}($params)
94{
95${{self.body}}
96}
97''')
98 return str(code)
99
100__all__ = [ "Func" ]
88
89 params = ', '.join(self.param_strings)
90
91 code('''
92$return_type
93${klass}::${{self.c_ident}}($params)
94{
95${{self.body}}
96}
97''')
98 return str(code)
99
100__all__ = [ "Func" ]