PyType_FromSpecWithBases { get; }
}
}
diff --git a/src/runtime/typemanager.cs b/src/runtime/typemanager.cs
index e0564b243..01aceb656 100644
--- a/src/runtime/typemanager.cs
+++ b/src/runtime/typemanager.cs
@@ -171,9 +171,9 @@ internal static IntPtr CreateType(Type impl)
SlotsHolder slotsHolder = CreateSolotsHolder(type);
InitializeSlots(type, impl, slotsHolder);
- int flags = TypeFlags.Default | TypeFlags.Managed |
+ var flags = TypeFlags.Default | TypeFlags.Managed |
TypeFlags.HeapType | TypeFlags.HaveGC;
- Util.WriteCLong(type, TypeOffset.tp_flags, flags);
+ Util.WriteCLong(type, TypeOffset.tp_flags, (int)flags);
if (Runtime.PyType_Ready(type) != 0)
{
@@ -286,12 +286,12 @@ internal static IntPtr CreateType(ManagedType impl, Type clrType)
Runtime.XIncref(base_);
}
- const int flags = TypeFlags.Default
+ const TypeFlags flags = TypeFlags.Default
| TypeFlags.Managed
| TypeFlags.HeapType
| TypeFlags.BaseType
| TypeFlags.HaveGC;
- Util.WriteCLong(type, TypeOffset.tp_flags, flags);
+ Util.WriteCLong(type, TypeOffset.tp_flags, (int)flags);
OperatorMethod.FixupSlots(type, clrType);
// Leverage followup initialization from the Python runtime. Note
@@ -457,11 +457,11 @@ internal static IntPtr CreateMetaType(Type impl, out SlotsHolder slotsHolder)
int size = TypeOffset.magic() + IntPtr.Size;
Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, new IntPtr(size));
- const int flags = TypeFlags.Default
+ const TypeFlags flags = TypeFlags.Default
| TypeFlags.Managed
| TypeFlags.HeapType
| TypeFlags.HaveGC;
- Util.WriteCLong(type, TypeOffset.tp_flags, flags);
+ Util.WriteCLong(type, TypeOffset.tp_flags, (int)flags);
// Slots will inherit from TypeType, it's not neccesary for setting them.
// Inheried slots:
@@ -562,11 +562,11 @@ internal static IntPtr BasicSubType(string name, IntPtr base_, Type impl)
Marshal.WriteIntPtr(type, TypeOffset.tp_base, base_);
Runtime.XIncref(base_);
- int flags = TypeFlags.Default;
+ var flags = TypeFlags.Default;
flags |= TypeFlags.Managed;
flags |= TypeFlags.HeapType;
flags |= TypeFlags.HaveGC;
- Util.WriteCLong(type, TypeOffset.tp_flags, flags);
+ Util.WriteCLong(type, TypeOffset.tp_flags, (int)flags);
CopySlot(base_, type, TypeOffset.tp_traverse);
CopySlot(base_, type, TypeOffset.tp_clear);
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy