Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/runtime/pyobject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public object AsManagedObject(Type t)
}
return result;
}

/// <summary>
/// As Method
/// </summary>
Expand Down Expand Up @@ -1121,10 +1121,10 @@ public override bool TryBinaryOperation(BinaryOperationBinder binder, object arg
res = Runtime.PyNumber_InPlaceMultiply(this.obj, ((PyObject)arg).obj);
break;
case ExpressionType.Divide:
res = Runtime.PyNumber_Divide(this.obj, ((PyObject)arg).obj);
res = Runtime.PyNumber_TrueDivide(this.obj, ((PyObject)arg).obj);
break;
case ExpressionType.DivideAssign:
res = Runtime.PyNumber_InPlaceDivide(this.obj, ((PyObject)arg).obj);
res = Runtime.PyNumber_InPlaceTrueDivide(this.obj, ((PyObject)arg).obj);
break;
case ExpressionType.And:
res = Runtime.PyNumber_And(this.obj, ((PyObject)arg).obj);
Expand Down
10 changes: 5 additions & 5 deletions src/runtime/runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static IntPtr GetProcAddress(IntPtr dllHandle, string name)
public class Runtime
{
// C# compiler copies constants to the assemblies that references this library.
// We needs to replace all public constants to static readonly fields to allow
// We needs to replace all public constants to static readonly fields to allow
// binary substitution of different Python.Runtime.dll builds in a target application.

public static int UCS => _UCS;
Expand All @@ -131,7 +131,7 @@ public class Runtime
#endif

// C# compiler copies constants to the assemblies that references this library.
// We needs to replace all public constants to static readonly fields to allow
// We needs to replace all public constants to static readonly fields to allow
// binary substitution of different Python.Runtime.dll builds in a target application.

public static string pyversion => _pyversion;
Expand Down Expand Up @@ -174,7 +174,7 @@ public class Runtime
#endif

// C# compiler copies constants to the assemblies that references this library.
// We needs to replace all public constants to static readonly fields to allow
// We needs to replace all public constants to static readonly fields to allow
// binary substitution of different Python.Runtime.dll builds in a target application.

public static readonly string PythonDLL = _PythonDll;
Expand Down Expand Up @@ -1188,7 +1188,7 @@ internal static bool PyFloat_Check(IntPtr ob)
internal static extern IntPtr PyNumber_Multiply(IntPtr o1, IntPtr o2);

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyNumber_Divide(IntPtr o1, IntPtr o2);
internal static extern IntPtr PyNumber_TrueDivide(IntPtr o1, IntPtr o2);

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyNumber_And(IntPtr o1, IntPtr o2);
Expand Down Expand Up @@ -1221,7 +1221,7 @@ internal static bool PyFloat_Check(IntPtr ob)
internal static extern IntPtr PyNumber_InPlaceMultiply(IntPtr o1, IntPtr o2);

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyNumber_InPlaceDivide(IntPtr o1, IntPtr o2);
internal static extern IntPtr PyNumber_InPlaceTrueDivide(IntPtr o1, IntPtr o2);

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr PyNumber_InPlaceAnd(IntPtr o1, IntPtr o2);
Expand Down