Boost logo

Boost :

From: Ullrich Koethe (koethe_at_[hidden])
Date: 2000-12-11 08:41:47


> > > > > Probably the best solution would chain the name_holders into a
> stack, in
> > > case a
> > > > > module might be initialized during another module's initialization.
> > > > >
> > > >
> > > > Sounds right to me. Can you add that?
> > >
> > > Sure, it would be easy. But is it needed for anything we're currently
> doing?
> > > If so, should I add it to an existing branch?
> >
> > So far, it works without that addition.
>
> But in your version you've commented out the assert. I'd really like to know
> why two module_builders end up existing at the same time in your scenario.
>

Suppose I've linked module "depmodule.so" against module
"sharedmodule.so". Then both modules share the variable "name_holder"
defined in the unnamed namespace of module_builder.cpp. This variable is
set when module "shared" is loaded into Python. When I later try to load
module "dep", "dep" wants to set this variable again, and the assertion
fires.

Ulli

-- 
 ________________________________________________________________
|                                                                |
| Ullrich Koethe  Universität Hamburg / University of Hamburg    |
|                 FB Informatik / Dept. of Computer Science      |
|                 AB Kognitive Systeme / Cognitive Systems Group |
|                                                                |
| Phone: +49 (0)40 42883-2573                Vogt-Koelln-Str. 30 |
| Fax:   +49 (0)40 42883-2572                D - 22527 Hamburg   |
| Email: u.koethe_at_[hidden]               Germany             |
|        koethe_at_[hidden]                        |
| WWW:   http://kogs-www.informatik.uni-hamburg.de/~koethe/      |
|________________________________________________________________|

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk