8000 fixed minor warnings · pythonnet/pythonnet@d7d5cb7 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7d5cb7

Browse files
committed
fixed minor warnings
1 parent e269cf0 commit d7d5cb7

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/runtime/arrayobject.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
140140
/// <summary>
141141
/// Implements __getitem__ for array types.
142142
/// </summary>
143-
public new static NewReference mp_subscript(BorrowedReference ob, BorrowedReference idx)
143+
public static NewReference mp_subscript(BorrowedReference ob, BorrowedReference idx)
144144
{
145145
var obj = (CLRObject)GetManagedObject(ob)!;
146146
var arrObj = (ArrayObject)GetManagedObject(Runtime.PyObject_TYPE(ob))!;
@@ -243,7 +243,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
243243
/// <summary>
244244
/// Implements __setitem__ for array types.
245245
/// </summary>
246-
public static new int mp_ass_subscript(BorrowedReference ob, BorrowedReference idx, BorrowedReference v)
246+
public static int mp_ass_subscript(BorrowedReference ob, BorrowedReference idx, BorrowedReference v)
247247
{
248248
var obj = (CLRObject)GetManagedObject(ob)!;
249249
var items = (Array)obj.inst;

src/runtime/classderived.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
using Python.Runtime.Native;
1111

12+
#pragma warning disable CS0618 // Type or member is obsolete. OK for internal use
1213
using static Python.Runtime.PythonDerivedType;
14+
#pragma warning restore CS0618 // Type or member is obsolete
1315

1416
namespace Python.Runtime
1517
{

src/runtime/classmanager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ internal static void RestoreRuntimeData(ClassManagerState storage)
131131
/// reflected managed type, creating it if it doesn't yet exist.
132132
/// </summary>
133133
internal static ReflectedClrType GetClass(Type type) => ReflectedClrType.GetOrCreate(type);
134+
134135
internal static ClassBase GetClassImpl(Type type)
135136
{
136137
var pyType = GetClass(type);

src/runtime/metatype.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ public static PyType Initialize()
3737

3838
public static void Release()
3939
{
40-
//if (Runtime.Refcount(PyCLRMetaType) > 1)
41-
//{
42-
// _metaSlotsHodler.ResetSlots();
43-
//}
4440
PyCLRMetaType.Dispose();
45-
//_metaSlotsHodler = null!;
4641
}
4742

4843
internal static MetatypeState SaveRuntimeData() => new() { CLRMetaType = PyCLRMetaType };

0 commit comments

Comments
 (0)
0