Skip to content

Commit 2bc61c7

Browse files
committed
Fix repr
1 parent c5a858e commit 2bc61c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/IronPython.Modules/_thread.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ public bool locked()
199199

200200
public string __repr__() {
201201
if (curHolder is null) {
202-
return $"<unlocked _thread.lock object at 0x{IdDispenser.GetId(this):16X}";
202+
return $"<unlocked _thread.lock object at 0x{IdDispenser.GetId(this):X16}>";
203203
}
204-
return $"<locked _thread.lock object 0x{IdDispenser.GetId(this):16X}";
204+
return $"<locked _thread.lock object at 0x{IdDispenser.GetId(this):X16}>";
205205
}
206206

207207
private void CreateBlockEvent() {
@@ -286,9 +286,9 @@ public void release() {
286286

287287
public string __repr__() {
288288
if (curHolder is null) {
289-
return $"<unlocked _thread.RLock object owner=0 count=0 at 0x{IdDispenser.GetId(this):16X}";
289+
return $"<unlocked _thread.RLock object owner=0 count=0 at 0x{IdDispenser.GetId(this):X16}>";
290290
}
291-
return $"<locked _thread.RLock object owner={curHolder?.ManagedThreadId} count={count} at 0x{IdDispenser.GetId(this):16X}";
291+
return $"<locked _thread.RLock object owner={curHolder?.ManagedThreadId} count={count} at 0x{IdDispenser.GetId(this):X16}>";
292292
}
293293

294294
public void _acquire_restore([NotNone] PythonTuple state) {

0 commit comments

Comments
 (0)