summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authorlye <lye@>2014-02-23 18:49:04 -0600
committerlye <lye@>2014-02-23 18:51:56 -0600
commit48a02566d63adedb2dc7412996fb7ff5d6d26f72 (patch)
tree1fc8dd43f9b18545777ff9f9030a218da1a44c89 /index.go
parent375168abdc4cfad66d75786e31ee758bc5e374b7 (diff)
Pre-emptively copy data when marshalling diff callback data.
When marshalling diff callback data to Go structs, any `char*` need to be pre-emptively copied onto Go's heap as they're invalidated as soon as our callback function returns. This patch adds this extra copy before sending the value to the channel, which fixes a bug wherein `DiffLine.Content`, `DiffFile.Path` and `DiffHunk.Header` would previously return garbage data.
Diffstat (limited to 'index.go')
0 files changed, 0 insertions, 0 deletions