Upgraded parrot today and ran into some snags with in my own
perl5lv.pmc that includes perl.h
The error was
/Users/sky/Documents/Projects/ponie/perl/proto.h:778: parse error
before '.' token
That line is
PERL_CALLCONV void Perl_utilize(pTHX_ int aver, I32 floor, OP* version,
OP* idop, OP* arg);
Which convienently gets converted to
void Perl_utilize ( int aver , I32 floor , OP * obj . version , OP *
idop , OP * arg ) ;
because of
include/parrot/pobj.h:# define version obj.version
So I am wondering about the status of how to write my own pmc, should
it not include parrot/parrot.h ? If it should, perhaps it would be good
if all parrot things are prefixed as suck, at least when they have very
generic meanings?
Arthur
> include/parrot/pobj.h:# define version obj.version
Sorry for that :) We can AFAIK toss the version part of a PObj. Its
almost unused and hardly needed. It could be renamed too inside parrot.
It should be out of the way, if you "#define DISABLE_GC_DEBUG 1" before
including parrot.h
> Arthur
leo
For the time being I just did
#define version version
:)
Arthur
> For the time being I just did
> #define version version
And I have checked in s/version/pobj_version/g :)
> Arthur
leo
I'm the guilty one who added the version field (though back then, it
was added to a Buffer object, IIRC). I found it very helpful in
debugging GC problems -- I would have a problem where memory was being
stomped on, and trace it back to a prematurely freed and reused
header. But in order to figure out what was going on, I needed to
trace it back to the point of allocation of the header, but headers
get reused so frequently that setting a conditional breakpoint on the
address of the header was useless. So I added in the version number to
provide something to set a breakpoint on.
It is very possible that this is no longer useful; I haven't been
working on stuff where I have needed it for long enough that the code
has mutated significantly. Is it still useful? If not, then go ahead
and rip it out.
Its still useful for the reason you described. Its renamed now to
pobj_version.
leo