Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit57d7779

Browse files
committed
fix potential double free
1 parent3043201 commit57d7779

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎src/embed_tests/Codecs.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,9 @@ public void SequenceDecoderTest()
218218
Assert.IsFalse(codec.CanDecode(fooType,typeof(ICollection<int>)));
219219

220220
//python tuples do satisfy the python sequence protocol
221-
varpyTuple=newPyObject(Runtime.PyTuple_New(3));
221+
varpyTuple=newPyTuple(items.ToArray());
222222
varpyTupleType=pyTuple.GetPythonType();
223223

224-
Runtime.PyTuple_SetItem(pyTuple.Handle,0,items[0].Handle);
225-
Runtime.PyTuple_SetItem(pyTuple.Handle,1,items[1].Handle);
226-
Runtime.PyTuple_SetItem(pyTuple.Handle,2,items[2].Handle);
227-
228224
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<float>)));
229225
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<int>)));
230226
Assert.IsTrue(codec.CanDecode(pyTupleType,typeof(ICollection<string>)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp