| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -626,7 +626,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 626 | 626 | if (Runtime.PyUnicode_GetSize(value) == 1) | |
| 627 | 627 | { | |
| 628 | 628 | op = Runtime.PyUnicode_AS_UNICODE(value); | |
| 629 | - #if (!UCS4) | ||
| 629 | + #if !UCS4 | ||
| 630 | 630 | // 2011-01-02: Marshal as character array because the cast | |
| 631 | 631 | // result = (char)Marshal.ReadInt16(op); throws an OverflowException | |
| 632 | 632 | // on negative numbers with Check Overflow option set on the project | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,7 +76,7 @@ static ObjectOffset() | |||
| 76 | 76 | { | |
| 77 | 77 | int size = IntPtr.Size; | |
| 78 | 78 | int n = 0; // Py_TRACE_REFS add two pointers to PyObject_HEAD | |
| 79 | - #if (Py_DEBUG) | ||
| 79 | + #if Py_DEBUG | ||
| 80 | 80 | _ob_next = 0; | |
| 81 | 81 | _ob_prev = 1 * size; | |
| 82 | 82 | n = 2; | |
@@ -114,14 +114,14 @@ public static int Size(IntPtr ob) | |||
| 114 | 114 | { | |
| 115 | 115 | return ExceptionOffset.Size(); | |
| 116 | 116 | } | |
| 117 | - #if (Py_DEBUG) | ||
| 117 | + #if Py_DEBUG | ||
| 118 | 118 | return 6 * IntPtr.Size; | |
| 119 | 119 | #else | |
| 120 | 120 | return 4 * IntPtr.Size; | |
| 121 | 121 | #endif | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | - #if (Py_DEBUG) | ||
| 124 | + #if Py_DEBUG | ||
| 125 | 125 | public static int _ob_next; | |
| 126 | 126 | public static int _ob_prev; | |
| 127 | 127 | #endif | |
@@ -186,7 +186,7 @@ static BytesOffset() | |||
| 186 | 186 | ||
| 187 | 187 | /* The *real* layout of a type object when allocated on the heap */ | |
| 188 | 188 | //typedef struct _heaptypeobject { | |
| 189 | - #if (Py_DEBUG) // #ifdef Py_TRACE_REFS | ||
| 189 | + #if Py_DEBUG // #ifdef Py_TRACE_REFS | ||
| 190 | 190 | /* _PyObject_HEAD_EXTRA defines pointers to support a doubly-linked list of all live heap objects. */ | |
| 191 | 191 | public static int _ob_next = 0; | |
| 192 | 192 | public static int _ob_prev = 0; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,30 +2,32 @@ | |||
| 2 | 2 | // DO NOT MODIFIY BY HAND. | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - | ||
| 6 | - #if (PYTHON26) | ||
| 5 | + #if PYTHON26 | ||
| 7 | 6 | using System; | |
| 8 | 7 | using System.Collections; | |
| 9 | 8 | using System.Collections.Specialized; | |
| 10 | 9 | using System.Runtime.InteropServices; | |
| 11 | 10 | using System.Reflection; | |
| 12 | 11 | using System.Text; | |
| 13 | 12 | ||
| 14 | - namespace Python.Runtime { | ||
| 15 | - | ||
| 16 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 17 | - internal class TypeOffset { | ||
| 18 | - | ||
| 19 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 20 | 20 | Type type = typeof(TypeOffset); | |
| 21 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 22 | 22 | int size = IntPtr.Size; | |
| 23 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 24 | 25 | fi[i].SetValue(null, i * size); | |
| 25 | 26 | } | |
| 26 | 27 | } | |
| 27 | 28 | ||
| 28 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 29 | 31 | return ob_size; | |
| 30 | 32 | } | |
| 31 | 33 | ||
@@ -144,4 +146,5 @@ public static int magic() { | |||
| 144 | 146 | public static int members = 0; | |
| 145 | 147 | } | |
| 146 | 148 | } | |
| 147 | - #endif | ||
| 149 | + | ||
| 150 | + #endif | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,8 @@ | |||
| 1 | 1 | // Auto-generated by geninterop.py. | |
| 2 | 2 | // DO NOT MODIFIY BY HAND. | |
| 3 | 3 | ||
| 4 | - #if (PYTHON27) | ||
| 4 | + | ||
| 5 | + #if PYTHON27 | ||
| 5 | 6 | using System; | |
| 6 | 7 | using System.Collections; | |
| 7 | 8 | using System.Collections.Specialized; | |
@@ -21,7 +22,7 @@ static TypeOffset() | |||
| 21 | 22 | int size = IntPtr.Size; | |
| 22 | 23 | for (int i = 0; i < fi.Length; i++) | |
| 23 | 24 | { | |
| 24 | - fi[i].SetValue(null, i*size); | ||
| 25 | + fi[i].SetValue(null, i * size); | ||
| 25 | 26 | } | |
| 26 | 27 | } | |
| 27 | 28 | ||
@@ -146,4 +147,4 @@ public static int magic() | |||
| 146 | 147 | } | |
| 147 | 148 | } | |
| 148 | 149 | ||
| 149 | - #endif | ||
| 150 | + #endif | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,30 +2,32 @@ | |||
| 2 | 2 | // DO NOT MODIFIY BY HAND. | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - | ||
| 6 | - #if (PYTHON32) | ||
| 5 | + #if PYTHON32 | ||
| 7 | 6 | using System; | |
| 8 | 7 | using System.Collections; | |
| 9 | 8 | using System.Collections.Specialized; | |
| 10 | 9 | using System.Runtime.InteropServices; | |
| 11 | 10 | using System.Reflection; | |
| 12 | 11 | using System.Text; | |
| 13 | 12 | ||
| 14 | - namespace Python.Runtime { | ||
| 15 | - | ||
| 16 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 17 | - internal class TypeOffset { | ||
| 18 | - | ||
| 19 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 20 | 20 | Type type = typeof(TypeOffset); | |
| 21 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 22 | 22 | int size = IntPtr.Size; | |
| 23 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 24 | 25 | fi[i].SetValue(null, i * size); | |
| 25 | 26 | } | |
| 26 | 27 | } | |
| 27 | 28 | ||
| 28 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 29 | 31 | return ob_size; | |
| 30 | 32 | } | |
| 31 | 33 | ||
@@ -135,4 +137,5 @@ public static int magic() { | |||
| 135 | 137 | public static int members = 0; | |
| 136 | 138 | } | |
| 137 | 139 | } | |
| 138 | - #endif | ||
| 140 | + | ||
| 141 | + #endif | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,30 +1,33 @@ | |||
| 1 | - | ||
| 2 | 1 | // Auto-generated by geninterop.py. | |
| 3 | 2 | // DO NOT MODIFIY BY HAND. | |
| 4 | 3 | ||
| 5 | - #if (PYTHON33) | ||
| 4 | + | ||
| 5 | + #if PYTHON33 | ||
| 6 | 6 | using System; | |
| 7 | 7 | using System.Collections; | |
| 8 | 8 | using System.Collections.Specialized; | |
| 9 | 9 | using System.Runtime.InteropServices; | |
| 10 | 10 | using System.Reflection; | |
| 11 | 11 | using System.Text; | |
| 12 | 12 | ||
| 13 | - namespace Python.Runtime { | ||
| 14 | - | ||
| 15 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 16 | - internal class TypeOffset { | ||
| 17 | - | ||
| 18 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 19 | 20 | Type type = typeof(TypeOffset); | |
| 20 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 21 | 22 | int size = IntPtr.Size; | |
| 22 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 23 | 25 | fi[i].SetValue(null, i * size); | |
| 24 | 26 | } | |
| 25 | 27 | } | |
| 26 | 28 | ||
| 27 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 28 | 31 | return ob_size; | |
| 29 | 32 | } | |
| 30 | 33 | ||
@@ -136,4 +139,5 @@ public static int magic() { | |||
| 136 | 139 | public static int members = 0; | |
| 137 | 140 | } | |
| 138 | 141 | } | |
| 142 | + | ||
| 139 | 143 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,30 +2,32 @@ | |||
| 2 | 2 | // DO NOT MODIFIY BY HAND. | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - | ||
| 6 | - #if (PYTHON34) | ||
| 5 | + #if PYTHON34 | ||
| 7 | 6 | using System; | |
| 8 | 7 | using System.Collections; | |
| 9 | 8 | using System.Collections.Specialized; | |
| 10 | 9 | using System.Runtime.InteropServices; | |
| 11 | 10 | using System.Reflection; | |
| 12 | 11 | using System.Text; | |
| 13 | 12 | ||
| 14 | - namespace Python.Runtime { | ||
| 15 | - | ||
| 16 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 17 | - internal class TypeOffset { | ||
| 18 | - | ||
| 19 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 20 | 20 | Type type = typeof(TypeOffset); | |
| 21 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 22 | 22 | int size = IntPtr.Size; | |
| 23 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 24 | 25 | fi[i].SetValue(null, i * size); | |
| 25 | 26 | } | |
| 26 | 27 | } | |
| 27 | 28 | ||
| 28 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 29 | 31 | return ob_size; | |
| 30 | 32 | } | |
| 31 | 33 | ||
@@ -138,4 +140,5 @@ public static int magic() { | |||
| 138 | 140 | public static int members = 0; | |
| 139 | 141 | } | |
| 140 | 142 | } | |
| 141 | - #endif | ||
| 143 | + | ||
| 144 | + #endif | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,30 +2,32 @@ | |||
| 2 | 2 | // DO NOT MODIFIY BY HAND. | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - | ||
| 6 | - #if (PYTHON35) | ||
| 5 | + #if PYTHON35 | ||
| 7 | 6 | using System; | |
| 8 | 7 | using System.Collections; | |
| 9 | 8 | using System.Collections.Specialized; | |
| 10 | 9 | using System.Runtime.InteropServices; | |
| 11 | 10 | using System.Reflection; | |
| 12 | 11 | using System.Text; | |
| 13 | 12 | ||
| 14 | - namespace Python.Runtime { | ||
| 15 | - | ||
| 16 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 17 | - internal class TypeOffset { | ||
| 18 | - | ||
| 19 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 20 | 20 | Type type = typeof(TypeOffset); | |
| 21 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 22 | 22 | int size = IntPtr.Size; | |
| 23 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 24 | 25 | fi[i].SetValue(null, i * size); | |
| 25 | 26 | } | |
| 26 | 27 | } | |
| 27 | 28 | ||
| 28 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 29 | 31 | return ob_size; | |
| 30 | 32 | } | |
| 31 | 33 | ||
@@ -143,4 +145,5 @@ public static int magic() { | |||
| 143 | 145 | public static int members = 0; | |
| 144 | 146 | } | |
| 145 | 147 | } | |
| 148 | + | ||
| 146 | 149 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,29 +1,33 @@ | |||
| 1 | - | ||
| 2 | 1 | // Auto-generated by geninterop.py. | |
| 3 | 2 | // DO NOT MODIFIY BY HAND. | |
| 4 | - #if (PYTHON36) | ||
| 3 | + | ||
| 4 | + | ||
| 5 | + #if PYTHON36 | ||
| 5 | 6 | using System; | |
| 6 | 7 | using System.Collections; | |
| 7 | 8 | using System.Collections.Specialized; | |
| 8 | 9 | using System.Runtime.InteropServices; | |
| 9 | 10 | using System.Reflection; | |
| 10 | 11 | using System.Text; | |
| 11 | 12 | ||
| 12 | - namespace Python.Runtime { | ||
| 13 | - | ||
| 14 | - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] | ||
| 15 | - internal class TypeOffset { | ||
| 16 | - | ||
| 17 | - static TypeOffset() { | ||
| 13 | + namespace Python.Runtime | ||
| 14 | + { | ||
| 15 | + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||
| 16 | + internal class TypeOffset | ||
| 17 | + { | ||
| 18 | + static TypeOffset() | ||
| 19 | + { | ||
| 18 | 20 | Type type = typeof(TypeOffset); | |
| 19 | 21 | FieldInfo[] fi = type.GetFields(); | |
| 20 | 22 | int size = IntPtr.Size; | |
| 21 | - for (int i = 0; i < fi.Length; i++) { | ||
| 23 | + for (int i = 0; i < fi.Length; i++) | ||
| 24 | + { | ||
| 22 | 25 | fi[i].SetValue(null, i * size); | |
| 23 | 26 | } | |
| 24 | 27 | } | |
| 25 | 28 | ||
| 26 | - public static int magic() { | ||
| 29 | + public static int magic() | ||
| 30 | + { | ||
| 27 | 31 | return ob_size; | |
| 28 | 32 | } | |
| 29 | 33 | ||
@@ -141,4 +145,5 @@ public static int magic() { | |||
| 141 | 145 | public static int members = 0; | |
| 142 | 146 | } | |
| 143 | 147 | } | |
| 148 | + | ||
| 144 | 149 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #if (UCS4) | ||
| 1 | + #if UCS4 | ||
| 2 | 2 | using System; | |
| 3 | 3 | using System.Runtime.InteropServices; | |
| 4 | 4 | using System.Text; | |
@@ -50,4 +50,4 @@ public object MarshalNativeToManaged(IntPtr | |||
| 50 | 50 | } | |
| 51 | 51 | } | |
| 52 | 52 | ||
| 53 | - #endif | ||
| 53 | + #endif | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments