Deleted Added
sdiff udiff text old ( 10453:d0365cc3d05f ) new ( 11548:91f58918a76a )
full compact
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

143 list<EmbeddedPython *>::iterator end = getList().end();
144 for (; i != end; ++i)
145 if (!(*i)->addModule())
146 return 1;
147
148 return 0;
149}
150
151EmbeddedSwig::EmbeddedSwig(void (*init_func)())
152 : initFunc(init_func)
153{
154 getList().push_back(this);
155}
156
157list<EmbeddedSwig *> &
158EmbeddedSwig::getList()
159{
160 static list<EmbeddedSwig *> the_list;
161 return the_list;
162}
163
164void
165EmbeddedSwig::initAll()
166{
167 // initialize SWIG modules. initSwig() is autogenerated and calls
168 // all of the individual swig initialization functions.
169 list<EmbeddedSwig *>::iterator i = getList().begin();
170 list<EmbeddedSwig *>::iterator end = getList().end();
171 for (; i != end; ++i)
172 (*i)->initFunc();
173}
174
175int
176initM5Python()
177{
178 EmbeddedSwig::initAll();
179 return EmbeddedPython::initAll();
180}

--- 63 unchanged lines hidden ---