I don't understand what enum_class_TclString is doing in
Parrot_TclString_class_init(Parrot_Interp interp, int entry) { struct _vtable temp_base_vtable = { NULL, /* package */ enum_class_TclString, /* base_type */
If I'm being dynamically generated, and I'm supposed to use the real values when morphing - what purpose does this serve? is it just a placeholder? And if so, why not just automatically gen it with -1 to avoid this issue? Or is this base_type used elsewhere... in which case does it have to be unique? across ALL dynamic pmcs? (and, if so, how do we insure that)
That said, I still can't get the dynclasses to work properly. Here's my latest attempt. I can apparently load "tclobject", which is an abstract pmc used for morphing (and therefore does me no good at the PIR level), but if I try to load any of the real libraries, like "tclstring", it fails, again with the "unknown error"
tclpmc.tar.gz
Description: GNU Zip compressed data
bash-2.05a$ cat dynfoo.imc .sub main loadlib $P2, "tclobject" $P2 = getprop "_filename", $P2 print "_filename:" print $P2 print "\n" $P2 = getprop "_ro", $P2 print "_ro:" print $P2 print "\n" loadlib $P2, "tclstring" $P2 = getprop "_filename", $P2 print "_filename:" print $P2 print "\n" $P2 = getprop "_ro", $P2 print "_ro:" print $P2 print "\n" end .end bash-2.05a$ ./parrot dynfoo.imc Couldn't load 'runtime/parrot/dynext/tclstring': unknow reason _filename:runtime/parrot/dynext/tclobject.dylib _ro: Couldn't load 'runtime/parrot/dynext/tclstring': unknow reason Null PMC access in getprop()bash-2.05a$ ls -l runtime/parrot/dynext/ total 344 drwxr-xr-x 5 coke staff 170 Mar 18 00:10 CVS -rw-r--r-- 1 coke staff 53 Oct 24 05:37 README -rw-r--r-- 1 coke staff 18004 Apr 11 13:58 foo.dylib -rw-r--r-- 1 coke staff 18340 Apr 11 13:58 subproxy.dylib -rw-r--r-- 1 coke staff 27016 Apr 11 13:59 tclarray.dylib -rw-r--r-- 1 coke staff 22364 Apr 11 13:59 tclfloat.dylib -rw-r--r-- 1 coke staff 18016 Apr 11 13:59 tclint.dylib -rw-r--r-- 1 coke staff 22920 Apr 11 13:59 tcllist.dylib -rw-r--r-- 1 coke staff 8808 Apr 11 13:58 tclobject.dylib -rw-r--r-- 1 coke staff 18300 Apr 11 13:58 tclstring.dylib
On Sunday, April 11, 2004, at 06:38 AM, Leopold Toetsch wrote:
Will Coleda <[EMAIL PROTECTED]> wrote:--"They tried and failed?"
"No, they tried and died."
Ok, it's not that bad, but it doesn't seem to work. I moved the .pmcs (same files in previous attachment) over to ./dnyclasses, updated the Makefile as directed in dynclasses/README.
You have to modify the PMCs a bit. The class enums are generated at load
time. You must have had compile errors during
$ make -C dynclasses clean all
You need basically (in tclstring.pmc):
#define enum_class_TclString -1
and some code in tclobject.morph to get at the real class enum.
leo
Will "Coke" Coleda will at coleda dot com