Kirill Simonov avatar Kirill Simonov committed ee83e66

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

Comments (0)

Files changed (1)

     yaml_get_version(&major, &minor, &patch)
     return (major, minor, patch)
 
-Mark = yaml.error.Mark
+#Mark = yaml.error.Mark
 YAMLError = yaml.error.YAMLError
 ReaderError = yaml.reader.ReaderError
 ScannerError = yaml.scanner.ScannerError
 SequenceNode = yaml.nodes.SequenceNode
 MappingNode = yaml.nodes.MappingNode
 
-#cdef class Mark:
-#    cdef readonly object name
-#    cdef readonly int index
-#    cdef readonly int line
-#    cdef readonly int column
-#    cdef readonly buffer
-#    cdef readonly pointer
-#
-#    def __init__(self, object name, int index, int line, int column,
-#            object buffer, object pointer):
-#        self.name = name
-#        self.index = index
-#        self.line = line
-#        self.column = column
-#        self.buffer = buffer
-#        self.pointer = pointer
-#
+cdef class Mark:
+    cdef readonly object name
+    cdef readonly int index
+    cdef readonly int line
+    cdef readonly int column
+    cdef readonly buffer
+    cdef readonly pointer
+
+    def __init__(self, object name, int index, int line, int column,
+            object buffer, object pointer):
+        self.name = name
+        self.index = index
+        self.line = line
+        self.column = column
+        self.buffer = buffer
+        self.pointer = pointer
+
 #    def get_snippet(self):
 #        return None
 #
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.