Changeset 181


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

GetCodeUnitPtr? confined to Parsing_Engine; UTF8 version defined.

Location:
trunk/src
Files:
2 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
  • trunk/src/engine.h

    r180 r181  
    3737        virtual void Parse_ExtSubsetDecl() = 0;
    3838        virtual void Parse_Prolog() = 0;
    39         unsigned char * GetCodeUnitPtr(int pos);
    4039        bool has_ByteOrderMark();
    4140        XML_version get_version();
Note: See TracChangeset for help on using the changeset viewer.