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

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 src/runtime/clrobject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal CLRObject(object ob, IntPtr tp)
{
IntPtr py = Runtime.PyType_GenericAlloc(tp, 0);

var flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
var flags = (long)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
if ((flags & TypeFlags.Subclass) != 0)
{
IntPtr dict = Marshal.ReadIntPtr(py, ObjectOffset.DictOffset(tp));
Expand Down
2 changes: 1 addition & 1 deletion 2 src/runtime/debughelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal static void DumpType(IntPtr type)
internal static void DumpInst(IntPtr ob)
{
IntPtr tp = Runtime.PyObject_TYPE(ob);
var sz = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_basicsize);
var sz = (long)Marshal.ReadIntPtr(tp, TypeOffset.tp_basicsize);

for (var i = 0; i < sz; i += IntPtr.Size)
{
Expand Down
4 changes: 2 additions & 2 deletions 4 src/runtime/managedtype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal static ManagedType GetManagedObject(IntPtr ob)
tp = ob;
}

var flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
var flags = (long)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
if ((flags & TypeFlags.Managed) != 0)
{
IntPtr op = tp == ob
Expand Down Expand Up @@ -63,7 +63,7 @@ internal static bool IsManagedType(IntPtr ob)
tp = ob;
}

var flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
var flags = (long)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
if ((flags & TypeFlags.Managed) != 0)
{
return true;
Expand Down
2 changes: 1 addition & 1 deletion 2 src/runtime/metatype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static void tp_dealloc(IntPtr tp)
{
// Fix this when we dont cheat on the handle for subclasses!

var flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
var flags = (long)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
if ((flags & TypeFlags.Subclass) == 0)
{
IntPtr gc = Marshal.ReadIntPtr(tp, TypeOffset.magic());
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.