You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e2d7d2a
Browse filesBrowse the repository at this point in the historyBrowse files
Accept dangling pointers and cut parse memory (#16)
* Accept dangling pointers and cut parse memory
loads() no longer raises for a pointer that matches no record; validate()
reports each one as a dangling-pointer error. GedcomStructure uses slots,
tags are interned, and lines are read one at a time, halving peak memory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Report dangling pointers on every structure
validate() checked a pointer only where the specification gives the
structure a pointer payload. Now that loads() keeps pointers to missing
records, a pointer on an extension, on a value or no-payload structure,
or on a record must be reported too. The target's record type is still
checked only where the payload names one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ with open("out.ged", "wb") as f:
31
31
32
32
Each record is a `GedcomStructure` with a `tag`, an optional `xref` and `pointer`, the raw `text` payload, and `children`. Its `value` property casts the payload to the data type the specification gives that structure type.
33
33
34
-
`loads` and `dumps` are the string equivalents. Non-conforming input raises `GedcomParseError`, a `ValueError` carrying `line_number`.
34
+
`loads` and `dumps` are the string equivalents. Non-conforming input raises `GedcomParseError`, a `ValueError` carrying `line_number`. A pointer to a record that does not exist is kept rather than rejected; `gedcom7.validate(records)` lists each one as a `dangling-pointer` error.
0 commit comments