Changeset 4bbcba3


Ignore:
Timestamp:
2008-02-16T22:40:38Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e6648bf
Parents:
add23a2
Message:

Moved xmltree handlers initialization to xt_new().

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    radd23a2 r4bbcba3  
    111111};
    112112
    113 struct xt_parser *xt_new( gpointer data )
     113struct xt_parser *xt_new( const struct xt_handler_entry *handlers, gpointer data )
    114114{
    115115        struct xt_parser *xt = g_new0( struct xt_parser, 1 );
    116116       
    117117        xt->data = data;
     118        xt->handlers = handlers;
    118119        xt_reset( xt );
    119120       
  • lib/xmltree.h

    radd23a2 r4bbcba3  
    7171        struct xt_node *cur;
    7272       
    73         struct xt_handler_entry *handlers;
     73        const struct xt_handler_entry *handlers;
    7474        gpointer data;
    7575       
     
    7777};
    7878
    79 struct xt_parser *xt_new( gpointer data );
     79struct xt_parser *xt_new( const struct xt_handler_entry *handlers, gpointer data );
    8080void xt_reset( struct xt_parser *xt );
    8181int xt_feed( struct xt_parser *xt, char *text, int text_len );
  • protocols/jabber/io.c

    radd23a2 r4bbcba3  
    521521           from the server too. */
    522522        xt_free( jd->xt );      /* In case we're RE-starting. */
    523         jd->xt = xt_new( ic );
    524         jd->xt->handlers = (struct xt_handler_entry*) jabber_handlers;
     523        jd->xt = xt_new( jabber_handlers, ic );
    525524       
    526525        if( jd->r_inpa <= 0 )
Note: See TracChangeset for help on using the changeset viewer.