File tree Expand file tree Collapse file tree 3 files changed +1112
-976
lines changed
Expand file tree Collapse file tree 3 files changed +1112
-976
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ pub struct PyNumberSlots {
256256 pub int : AtomicCell < Option < PyNumberUnaryFunc > > ,
257257 pub float : AtomicCell < Option < PyNumberUnaryFunc > > ,
258258
259+ // Right variants (internal - not exposed in SlotAccessor)
259260 pub right_add : AtomicCell < Option < PyNumberBinaryFunc > > ,
260261 pub right_subtract : AtomicCell < Option < PyNumberBinaryFunc > > ,
261262 pub right_multiply : AtomicCell < Option < PyNumberBinaryFunc > > ,
@@ -295,8 +296,7 @@ pub struct PyNumberSlots {
295296
296297impl From < & PyNumberMethods > for PyNumberSlots {
297298 fn from ( value : & PyNumberMethods ) -> Self {
298- // right_* functions will use the same left function as PyNumberMethods
299- // allows both f(self, other) and f(other, self)
299+ // right_* slots use the same function as left ops for native types
300300 Self {
301301 add : AtomicCell :: new ( value. add ) ,
302302 subtract : AtomicCell :: new ( value. subtract ) ,
You can’t perform that action at this time.
0 commit comments