On Mon, Aug 26, 2002 at 05:52:16AM +0300, Timo Sirainen wrote: > On Sun, Aug 25, 2002 at 04:31:24PM -0700, Manoj Kasichainula wrote: > > I don't have irssi-signal handling working quite yet. The main thing in > > the way is that I need a good way to recognize the type of each > > structure pointer (server, window, reconnect, etc.) and map it to the > > python wrapper object I've written for it. I haven't quite parsed out > > yet how the Perl module does this yet; what's the easiest way to go > > here? > > Perl uses docs/signals.txt and generates perl-signals-list.h from it, using > get-signals.pl. You'd probably do something similiar to that.
Hmmm. So modules that add their own signals couldn't have their signals processed by scripts? Maybe in the future, each _REC could include a field with a magic number (or a string pointer) indicating the type. Then signal handling code could look at the magic numbers and convert them appropriately. I only suggest this because I know you're pondering a rewrite :) > > What kind of relationships (inheritance, delegation, etc.) should I try > > to set up between the various irssi objects? For example, I haven't > > quite figured out whether SERVERs should be considered subclasses of > > SERVER_CONNECTs, vice versa, some form of containment/delegation, or > > none of the above. Any advice here would be appreciated. > > They're not inherited too much. Mostly just IRC (and other protocol) objects > inherit the core objects. Then CHANNEL_REC and QUERY_REC are inherited from > WI_ITEM_REC. I'm not sure if there was others. You should be able to see > these by looking if there's #include inside structure definition. > > SERVER_REC contains connrec which points to SERVER_CONNECT_REC, but I don't > think it should be considered inherited or anything.. or .. um.. well.. :) That was the impression I had :) > Looks like my perl code just merges the server and server_connect into one > perl object. I probably did it just because it was easier that way to use, > guess you should too :) Hmm, ok. This might actually make a lot of sense; I'll think about it. Thanks.
