Changeset 343


Ignore:
Timestamp:
12/31/08 06:04:28 (5 years ago)
Author:
xi
Message:

Restored Mark implementation in C as using the Python class causes a significant performance hit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/ext/_yaml.pyx

    r334 r343  
    1515    return (major, minor, patch) 
    1616 
    17 Mark = yaml.error.Mark 
     17#Mark = yaml.error.Mark 
    1818YAMLError = yaml.error.YAMLError 
    1919ReaderError = yaml.reader.ReaderError 
     
    6262MappingNode = yaml.nodes.MappingNode 
    6363 
    64 #cdef class Mark: 
    65 #    cdef readonly object name 
    66 #    cdef readonly int index 
    67 #    cdef readonly int line 
    68 #    cdef readonly int column 
    69 #    cdef readonly buffer 
    70 #    cdef readonly pointer 
    71 # 
    72 #    def __init__(self, object name, int index, int line, int column, 
    73 #            object buffer, object pointer): 
    74 #        self.name = name 
    75 #        self.index = index 
    76 #        self.line = line 
    77 #        self.column = column 
    78 #        self.buffer = buffer 
    79 #        self.pointer = pointer 
    80 # 
     64cdef class Mark: 
     65    cdef readonly object name 
     66    cdef readonly int index 
     67    cdef readonly int line 
     68    cdef readonly int column 
     69    cdef readonly buffer 
     70    cdef readonly pointer 
     71 
     72    def __init__(self, object name, int index, int line, int column, 
     73            object buffer, object pointer): 
     74        self.name = name 
     75        self.index = index 
     76        self.line = line 
     77        self.column = column 
     78        self.buffer = buffer 
     79        self.pointer = pointer 
     80 
    8181#    def get_snippet(self): 
    8282#        return None 
Note: See TracChangeset for help on using the changeset viewer.