<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/unsafe, branch dev.typeparams</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>spec, unsafe: clarify unsafe.Slice docs</title>
<updated>2021-07-02T19:26:52+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-07-01T23:52:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=743f03eeb0bdcb596b46fae51d23c0fcf0db0474'/>
<id>743f03eeb0bdcb596b46fae51d23c0fcf0db0474</id>
<content type='text'>
For #19367

Change-Id: If0ff8ddba3b6b48e2e198cf3653e73284c7572a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/332409
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For #19367

Change-Id: If0ff8ddba3b6b48e2e198cf3653e73284c7572a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/332409
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spec: change unsafe.Slice((*T)(nil), 0) to return []T(nil)</title>
<updated>2021-06-28T23:31:05+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-06-25T18:17:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1519271a939ad27da133318dc4bde7e6a41a35b5'/>
<id>1519271a939ad27da133318dc4bde7e6a41a35b5</id>
<content type='text'>
Updates #46742.

Change-Id: I044933a657cd1a5cdb29863e49751df5fe9c258a
Reviewed-on: https://go-review.googlesource.com/c/go/+/331069
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates #46742.

Change-Id: I044933a657cd1a5cdb29863e49751df5fe9c258a
Reviewed-on: https://go-review.googlesource.com/c/go/+/331069
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spec: add unsafe.Add and unsafe.Slice</title>
<updated>2021-04-22T22:03:10+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-04-21T07:12:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1da05eb0cebed9595ee0d326d9bd67edd046af0d'/>
<id>1da05eb0cebed9595ee0d326d9bd67edd046af0d</id>
<content type='text'>
Updates #19367.
Updates #40481.

Change-Id: I578066ad68d2cd6bea50df1a534cf799e4404a7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/312212
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates #19367.
Updates #40481.

Change-Id: I578066ad68d2cd6bea50df1a534cf799e4404a7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/312212
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: assume unsafe pointer arithmetic generates non-nil results</title>
<updated>2018-11-14T21:01:36+00:00</updated>
<author>
<name>Keith Randall</name>
<email>khr@google.com</email>
</author>
<published>2018-10-30T20:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0c7762cd184649552309c82671bf81f89d215ff7'/>
<id>0c7762cd184649552309c82671bf81f89d215ff7</id>
<content type='text'>
I've never seen a case where unsafe arithmetic is used to generate a nil.
(Something like var x uintptr; unsafe.Pointer(x - x).)
We can assume that if someone is doing arithmetic with pointers, the
result will be non-nil. Our unsafe rules already forbid this, although
we should be more explicit.

RELNOTE=It is invalid to convert a nil unsafe.Pointer to uintptr and back, with arithmetic.
(This was already invalid, but this statement has been added for clarification.)

Fixes #27180

Change-Id: I1880b7725a9fd99e4613799930fdad9aaa99e8f0
Reviewed-on: https://go-review.googlesource.com/c/146058
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've never seen a case where unsafe arithmetic is used to generate a nil.
(Something like var x uintptr; unsafe.Pointer(x - x).)
We can assume that if someone is doing arithmetic with pointers, the
result will be non-nil. Our unsafe rules already forbid this, although
we should be more explicit.

RELNOTE=It is invalid to convert a nil unsafe.Pointer to uintptr and back, with arithmetic.
(This was already invalid, but this statement has been added for clarification.)

Fixes #27180

Change-Id: I1880b7725a9fd99e4613799930fdad9aaa99e8f0
Reviewed-on: https://go-review.googlesource.com/c/146058
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unsafe: document that Alignof, Offsetof, and Sizeof return a constant</title>
<updated>2018-10-11T02:32:20+00:00</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2018-10-11T02:13:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=daf6f254336844ad8cf538640d81f0193988b62a'/>
<id>daf6f254336844ad8cf538640d81f0193988b62a</id>
<content type='text'>
Nothing is changing but the documentation, which did not mention
this property of these functions.

Fixes #27587.

Change-Id: I75bcee4a1dd9ec8cd82826c9a6e02ba7d599f719
Reviewed-on: https://go-review.googlesource.com/c/141377
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nothing is changing but the documentation, which did not mention
this property of these functions.

Fixes #27587.

Change-Id: I75bcee4a1dd9ec8cd82826c9a6e02ba7d599f719
Reviewed-on: https://go-review.googlesource.com/c/141377
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unsafe: fix reference to string header</title>
<updated>2018-02-26T18:35:46+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2018-02-25T23:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=85caeafb8c0d4c6926d67ce2939470780fab1a04'/>
<id>85caeafb8c0d4c6926d67ce2939470780fab1a04</id>
<content type='text'>
Fixes #24115

Change-Id: I89d3d5a9c0916fd2e21fe5930549c4129de8ab48
Reviewed-on: https://go-review.googlesource.com/96983
Reviewed-by: Giovanni Bajo &lt;rasky@develer.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #24115

Change-Id: I89d3d5a9c0916fd2e21fe5930549c4129de8ab48
Reviewed-on: https://go-review.googlesource.com/96983
Reviewed-by: Giovanni Bajo &lt;rasky@develer.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: remove some double spaces from comments</title>
<updated>2017-08-26T15:09:09+00:00</updated>
<author>
<name>Daniel Martí</name>
<email>mvdan@mvdan.cc</email>
</author>
<published>2017-08-19T20:33:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=99da8730b0b95da2c366135c8dc95dcfaf9c3715'/>
<id>99da8730b0b95da2c366135c8dc95dcfaf9c3715</id>
<content type='text'>
Went mainly for the ones that make no sense, such as the ones
mid-sentence or after commas.

Change-Id: Ie245d2c19cc7428a06295635cf6a9482ade25ff0
Reviewed-on: https://go-review.googlesource.com/57293
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Went mainly for the ones that make no sense, such as the ones
mid-sentence or after commas.

Change-Id: Ie245d2c19cc7428a06295635cf6a9482ade25ff0
Reviewed-on: https://go-review.googlesource.com/57293
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unsafe: remove incorrect type conversion in docs</title>
<updated>2016-11-07T18:54:14+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2016-11-06T18:35:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=9d139ac3fa1f4c0c468042bdc6248a30044fb1bb'/>
<id>9d139ac3fa1f4c0c468042bdc6248a30044fb1bb</id>
<content type='text'>
Fixes #17818.

Change-Id: Id7242b0bdd5e1db254b44ae29900fc4f3362c743
Reviewed-on: https://go-review.googlesource.com/32828
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #17818.

Change-Id: Id7242b0bdd5e1db254b44ae29900fc4f3362c743
Reviewed-on: https://go-review.googlesource.com/32828
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unsafe: document use of &amp;^ to round/align pointers</title>
<updated>2016-08-18T16:45:17+00:00</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josharian@gmail.com</email>
</author>
<published>2016-08-17T23:23:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=29df4c8f0004aa259093bf8dbf0bf966a392d44d'/>
<id>29df4c8f0004aa259093bf8dbf0bf966a392d44d</id>
<content type='text'>
Follow-up to CL 27156

Change-Id: I4f1cfced2dced9c9fc8a05bbc00ec4229e85c5c9
Reviewed-on: https://go-review.googlesource.com/27314
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to CL 27156

Change-Id: I4f1cfced2dced9c9fc8a05bbc00ec4229e85c5c9
Reviewed-on: https://go-review.googlesource.com/27314
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: single space after period.</title>
<updated>2016-03-02T00:13:47+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2016-03-01T23:21:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=5fea2ccc77eb50a9704fa04b7c61755fe34e1d95'/>
<id>5fea2ccc77eb50a9704fa04b7c61755fe34e1d95</id>
<content type='text'>
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.

This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:

$ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
$ go test go/doc -update

Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Dave Day &lt;djd@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.

This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:

$ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
$ go test go/doc -update

Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Dave Day &lt;djd@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
