develooper Front page | perl.perl6.internals | Postings from July 2002

[perl #15802] [PATCH] and new

srawls @ nhgs . tec . va . us
July 29, 2002 16:45
[perl #15802] [PATCH] and new
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #15802]
# in the subject line of all future correspondence about this issue. 
# <URL: >

I started working on implementing a Tuple pmc as someone else suggested as a good
starting project (and I'm still working :).  In doing that, I noticed that it was
hard to create a new pmc (or at least for me it was).  You had to change, pmc.h, genclass.h,, Makefile, and classes/Makefile.  And
of course, I learned that slowly, and didn't get everything right the first time
:)  Also, when you create a default pmc, it generates A LOT of warnings when you
only implement a few functions.  This patch does the following:

1) update to quinch some warnings of the type "control reaches end of
non-void function."  All it does is check if the return type is void, if not, it
returns 0, casted to the return type.

2) introduce an file.  This file, given ClassName as an arguemnt,
make classname.pmc (it turns its argument to lowercase when making the file to
keep within conventions, but keeps the case in everything else), and add the
appropriate entries to, pmc.h, genclass.h,, Makefile, and
classes/Makefile.  If you run 'perl SuperPMC' then you can assemble,
"new P0, .SuperPMC" and everything will be right.  Of course the vtable functions
are all unimplemented at first, but I can't do everything now can I? :)

Stephen Rawls

-- attachment  1 ------------------------------------------------------

-- attachment  2 ------------------------------------------------------
url: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About