On 2 May 2004, at 00:20, Leopold Toetsch wrote:
Arthur Bergman <[EMAIL PROTECTED]> wrote:
THERE ARE CASES
Arthur, please let's quietly talk about possible issues.
Many libraries that you want to use, demand that you call "The_lib_init(bla)". This isn't inappropriate, it's a rule. (dot). Parrot is GC based. (dot).
Yes, but they don't demand that at the top level, by demanding that at a top level you cut out all non opensource applications with a plugin based API, if this is your goal then I am going to stop playing right now.
This imposes different semantics for embedders. I've listed four different very simple ways to not get your PMC collected to early.
GC and refcounting are different schemes to achieve the same thing. You
know that. But nethertheless you have to follow these GC specific rules.
Leo, I am not an idiot, please do not treat me like one. I fail to see how the register/unregister PMC issue is semantically different from a reference count.
All I want to do is.
1) create a parrot interpreter 2) create some pmcs 3) call some code inside parrot with those pmcs
Now I am fine registering those PMCs that I create and unregister them afterwards, but inside the call to parrot everything should behave as normal! Currently there is no easy way to do this. The obvious answer seems to be to have the embedding interface set the top of stack in each embedding function if it is not set. This would do the right thing and make it easy to embed parrot.
Arthur