Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit fe5050d

Browse files
committed
Fix refcnt error
1 parent 2039e69 commit fe5050d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/classbase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ public static IntPtr tp_repr(IntPtr ob)
260260

261261
//otherwise use the standard object.__repr__(inst)
262262
IntPtr args = Runtime.PyTuple_New(1);
263+
Runtime.XIncref(ob);
263264
Runtime.PyTuple_SetItem(args, 0, ob);
264265
IntPtr reprFunc = Runtime.PyObject_GetAttrString(Runtime.PyBaseObjectType, "__repr__");
265266
var output = Runtime.PyObject_Call(reprFunc, args, IntPtr.Zero);

0 commit comments

Comments
 (0)