Changeset 181 for trunk/src/engine.c


Ignore:
Timestamp:
Jul 9, 2008, 1:48:32 PM (11 years ago)
Author:
cameron
Message:

GetCodeUnitPtr? confined to Parsing_Engine; UTF8 version defined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.c

    r180 r181  
    169169}
    170170
    171 unsigned char * Parser_Interface::GetCodeUnitPtr(int pos) {
    172         int rel_pos = pos - buffer_base_pos;
    173         return &((unsigned char *) (byteplex->src_buffer))[rel_pos * (int) entity_Info->code_unit_size];
    174 }
    175 
    176171template <class B>
    177172inline unsigned char * ParsingEngine<B>::GetCodeUnitPtr(int pos) {
    178173        int rel_pos = pos - buffer_base_pos;
    179174        return &((unsigned char *) (byteplex->src_buffer))[rel_pos * (int) B::Size];
     175}
     176
     177template <>
     178inline unsigned char * ParsingEngine<UTF8_Buffer>::GetCodeUnitPtr(int pos) {
     179        int rel_pos = pos - buffer_base_pos;
     180        return &((unsigned char *) (x8data))[rel_pos];
    180181}
    181182
Note: See TracChangeset for help on using the changeset viewer.