Skip to content

Commit 6d68d70

Browse files
authored
Merge branch 'master' into pyobject-finalizer
2 parents 90c67ca + 93a8c83 commit 6d68d70

File tree

6 files changed

+17
-20
lines changed

6 files changed

+17
-20
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ UpgradeLog*.htm
5757

5858
# Coverity
5959
cov-int/
60+
61+
# Visual Studio Code
62+
.vscode/*
63+
!.vscode/settings.json
64+
!.vscode/tasks.json
65+
!.vscode/launch.json
66+
!.vscode/extensions.json

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ matrix:
2323
- dotnet-runtime-2.0.0
2424
- dotnet-sdk-2.0.0
2525

26-
- python: 3.4
27-
env: *xplat-env
28-
addons: *xplat-addons
29-
3026
- python: 3.5
3127
env: *xplat-env
3228
addons: *xplat-addons
@@ -59,9 +55,6 @@ matrix:
5955
- BUILD_OPTS=
6056
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
6157

62-
- python: 3.4
63-
env: *classic-env
64-
6558
- python: 3.5
6659
env: *classic-env
6760

appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ environment:
1717
matrix:
1818
- PYTHON_VERSION: 2.7
1919
BUILD_OPTS: --xplat
20-
- PYTHON_VERSION: 3.4
21-
BUILD_OPTS: --xplat
2220
- PYTHON_VERSION: 3.5
2321
BUILD_OPTS: --xplat
2422
- PYTHON_VERSION: 3.6
2523
BUILD_OPTS: --xplat
2624
- PYTHON_VERSION: 3.7
2725
BUILD_OPTS: --xplat
2826
- PYTHON_VERSION: 2.7
29-
- PYTHON_VERSION: 3.4
3027
- PYTHON_VERSION: 3.5
3128
- PYTHON_VERSION: 3.6
3229
- PYTHON_VERSION: 3.7

src/embed_tests/TestTypeManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public static void TestMemoryMapping()
5454
// We can't use compiler flags because we compile with MONO_LINUX
5555
// while running on the Microsoft .NET Core during continuous
5656
// integration tests.
57-
if (System.Type.GetType ("Mono.Runtime") != null)
57+
/* if (System.Type.GetType ("Mono.Runtime") != null)
5858
{
5959
// Mono throws NRE instead of AccessViolationException for some reason.
6060
Assert.That(() => { Marshal.WriteInt64(page, 73); }, Throws.TypeOf<System.NullReferenceException>());
6161
Assert.That(Marshal.ReadInt64(page), Is.EqualTo(17));
62-
}
62+
} */
6363
}
6464
}
6565
}

src/runtime/pyobject.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public object AsManagedObject(Type t)
126126
}
127127
return result;
128128
}
129-
129+
130130
/// <summary>
131131
/// As Method
132132
/// </summary>
@@ -1150,10 +1150,10 @@ public override bool TryBinaryOperation(BinaryOperationBinder binder, object arg
11501150
res = Runtime.PyNumber_InPlaceMultiply(this.obj, ((PyObject)arg).obj);
11511151
break;
11521152
case ExpressionType.Divide:
1153-
res = Runtime.PyNumber_Divide(this.obj, ((PyObject)arg).obj);
1153+
res = Runtime.PyNumber_TrueDivide(this.obj, ((PyObject)arg).obj);
11541154
break;
11551155
case ExpressionType.DivideAssign:
1156-
res = Runtime.PyNumber_InPlaceDivide(this.obj, ((PyObject)arg).obj);
1156+
res = Runtime.PyNumber_InPlaceTrueDivide(this.obj, ((PyObject)arg).obj);
11571157
break;
11581158
case ExpressionType.And:
11591159
res = Runtime.PyNumber_And(this.obj, ((PyObject)arg).obj);

src/runtime/runtime.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static IntPtr GetProcAddress(IntPtr dllHandle, string name)
106106
public class Runtime
107107
{
108108
// C# compiler copies constants to the assemblies that references this library.
109-
// We needs to replace all public constants to static readonly fields to allow
109+
// We needs to replace all public constants to static readonly fields to allow
110110
// binary substitution of different Python.Runtime.dll builds in a target application.
111111

112112
public static int UCS => _UCS;
@@ -132,7 +132,7 @@ public class Runtime
132132
#endif
133133

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

138138
public static string pyversion => _pyversion;
@@ -175,7 +175,7 @@ public class Runtime
175175
#endif
176176

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

181181
public static readonly string PythonDLL = _PythonDll;
@@ -1193,7 +1193,7 @@ internal static bool PyFloat_Check(IntPtr ob)
11931193
internal static extern IntPtr PyNumber_Multiply(IntPtr o1, IntPtr o2);
11941194

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

11981198
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
11991199
internal static extern IntPtr PyNumber_And(IntPtr o1, IntPtr o2);
@@ -1226,7 +1226,7 @@ internal static bool PyFloat_Check(IntPtr ob)
12261226
internal static extern IntPtr PyNumber_InPlaceMultiply(IntPtr o1, IntPtr o2);
12271227

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

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

0 commit comments

Comments
 (0)
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