Changeset 350
- Timestamp:
- 08/29/09 15:15:31 (4 years ago)
- Location:
- pyyaml/trunk
- Files:
-
- 1 added
- 3 edited
-
ext/_yaml.pyx (modified) (1 diff)
-
tests/data/aliases-cdumper-bug.code (added)
-
tests/lib/test_constructor.py (modified) (2 diffs)
-
tests/lib3/test_constructor.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/ext/_yaml.pyx
r348 r350 1381 1381 anchor = NULL 1382 1382 if anchor_object is not None: 1383 anchor = PyString_AS_STRING(PyUnicode_AsUTF8String(anchor_object)) 1383 if PyUnicode_CheckExact(anchor_object): 1384 anchor_object = PyUnicode_AsUTF8String(anchor_object) 1385 if not PyString_CheckExact(anchor_object): 1386 if PY_MAJOR_VERSION < 3: 1387 raise TypeError("anchor must be a string") 1388 else: 1389 raise TypeError(u"anchor must be a string") 1390 anchor = PyString_AS_STRING(anchor_object) 1384 1391 if node in self.serialized_nodes: 1385 1392 if yaml_alias_event_initialize(&event, anchor) == 0: -
pyyaml/trunk/tests/lib/test_constructor.py
r330 r350 18 18 AnObject, AnInstance, AState, ACustomState, InitArgs, InitArgsWithState, \ 19 19 NewArgs, NewArgsWithState, Reduce, ReduceWithState, MyInt, MyList, MyDict, \ 20 FixedOffset, execute20 FixedOffset, today, execute 21 21 22 22 class MyLoader(yaml.Loader): … … 213 213 def dst(self, dt): 214 214 return datetime.timedelta(0) 215 216 today = datetime.date.today() 215 217 216 218 def _load_code(expression): -
pyyaml/trunk/tests/lib3/test_constructor.py
r330 r350 15 15 AnObject, AnInstance, AState, ACustomState, InitArgs, InitArgsWithState, \ 16 16 NewArgs, NewArgsWithState, Reduce, ReduceWithState, MyInt, MyList, MyDict, \ 17 FixedOffset, execute17 FixedOffset, today, execute 18 18 19 19 class MyLoader(yaml.Loader): … … 200 200 def dst(self, dt): 201 201 return datetime.timedelta(0) 202 203 today = datetime.date.today() 202 204 203 205 def _load_code(expression):
Note: See TracChangeset
for help on using the changeset viewer.
