| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ | |||
| 13 | 13 | <PrivateAssets>all</PrivateAssets> | |
| 14 | 14 | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | |
| 15 | 15 | </PackageReference> | |
| 16 | - <PackageReference Include="Lost.NonCopyableAnalyzer" Version="0.7.0-m04"> | ||
| 16 | + <PackageReference Include="Lost.NonCopyableAnalyzer" Version="0.7.0-m05"> | ||
| 17 | 17 | <PrivateAssets>all</PrivateAssets> | |
| 18 | 18 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | |
| 19 | 19 | </PackageReference> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -156,10 +156,5 @@ public static BorrowedReference Borrow(this in NewReference reference) | |||
| 156 | 156 | [DebuggerHidden] | |
| 157 | 157 | public static BorrowedReference BorrowOrThrow(this in NewReference reference) | |
| 158 | 158 | => reference.IsNull() ? throw PythonException.ThrowLastAsClrException() : reference.BorrowNullable(); | |
| 159 | - | ||
| 160 | - [Obsolete] | ||
| 161 | - [DebuggerHidden] | ||
| 162 | - public static NewReference AnalyzerWorkaround(this in NewReference reference) | ||
| 163 | - => NewReference.DangerousFromPointer(reference.DangerousGetAddress()); | ||
| 164 | 159 | } | |
| 165 | 160 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,7 +133,7 @@ internal static NewReference ToPython(IPythonDerivedType obj) | |||
| 133 | 133 | Runtime.PyObject_GC_Track(self); | |
| 134 | 134 | } | |
| 135 | 135 | ||
| 136 | - return result.AnalyzerWorkaround(); | ||
| 136 | + return result; | ||
| 137 | 137 | } | |
| 138 | 138 | ||
| 139 | 139 | /// <summary> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ static NewReference Create(object ob, BorrowedReference tp) | |||
| 30 | 30 | // slot if wrapping a CLR exception | |
| 31 | 31 | if (ob is Exception e) Exceptions.SetArgsAndCause(py.Borrow(), e); | |
| 32 | 32 | ||
| 33 | - return py.AnalyzerWorkaround(); | ||
| 33 | + return py; | ||
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | 36 | CLRObject(object inst) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,7 +37,7 @@ public virtual NewReference Alloc() | |||
| 37 | 37 | #endif | |
| 38 | 38 | SetupGc(py.Borrow(), tp); | |
| 39 | 39 | ||
| 40 | - return py.AnalyzerWorkaround(); | ||
| 40 | + return py; | ||
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | 43 | public PyObject AllocObject() => new PyObject(Alloc().Steal()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -113,7 +113,7 @@ internal NewReference GetDefaultArgs(BorrowedReference args) | |||
| 113 | 113 | using var arg = Converter.ToPython(pi[i + pynargs].DefaultValue, pi[i + pynargs].ParameterType); | |
| 114 | 114 | Runtime.PyTuple_SetItem(defaultArgs.Borrow(), i, arg.Steal()); | |
| 115 | 115 | } | |
| 116 | - return defaultArgs.AnalyzerWorkaround(); | ||
| 116 | + return defaultArgs; | ||
| 117 | 117 | } | |
| 118 | 118 | } | |
| 119 | 119 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -172,7 +172,7 @@ public static NewReference tp_new(BorrowedReference tp, BorrowedReference args, | |||
| 172 | 172 | ||
| 173 | 173 | Runtime.PyType_Modified(type.Borrow()); | |
| 174 | 174 | ||
| 175 | - return type.AnalyzerWorkaround(); | ||
| 175 | + return type; | ||
| 176 | 176 | } | |
| 177 | 177 | ||
| 178 | 178 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ public override NewReference Alloc() | |||
| 78 | 78 | ||
| 79 | 79 | InitializeModuleMembers(); | |
| 80 | 80 | ||
| 81 | - return py.AnalyzerWorkaround(); | ||
| 81 | + return py; | ||
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | 84 | ||
@@ -118,8 +118,8 @@ public NewReference GetAttribute(string name, bool guess) | |||
| 118 | 118 | if (AssemblyManager.IsValidNamespace(qname)) | |
| 119 | 119 | { | |
| 120 | 120 | var m = ModuleObject.Create(qname); | |
| 121 | - StoreAttribute(name, m.Borrow()); | ||
| 122 | - return m.AnalyzerWorkaround(); | ||
| 121 | + this.StoreAttribute(name, m.Borrow()); | ||
| 122 | + return m; | ||
| 123 | 123 | } | |
| 124 | 124 | ||
| 125 | 125 | // Look for a type in the current namespace. Note that this | |
@@ -142,14 +142,14 @@ public NewReference GetAttribute(string name, bool guess) | |||
| 142 | 142 | // enough to complicate the implementation for now. | |
| 143 | 143 | if (guess) | |
| 144 | 144 | { | |
| 145 | - string gname = GenericUtil.GenericNameForBaseName(_namespace, name); | ||
| 145 | + string gname = GenericUtil.GenericNameForBaseName(this._namespace, name); | ||
| 146 | 146 | if (gname != null) | |
| 147 | 147 | { | |
| 148 | - var o = GetAttribute(gname, false); | ||
| 148 | + var o = this.GetAttribute(gname, false); | ||
| 149 | 149 | if (!o.IsNull()) | |
| 150 | 150 | { | |
| 151 | - StoreAttribute(name, o.Borrow()); | ||
| 152 | - return o.AnalyzerWorkaround(); | ||
| 151 | + this.StoreAttribute(name, o.Borrow()); | ||
| 152 | + return o; | ||
| 153 | 153 | } | |
| 154 | 154 | } | |
| 155 | 155 | } | |
@@ -306,7 +306,7 @@ public static NewReference tp_getattro(BorrowedReference ob, BorrowedReference k | |||
| 306 | 306 | return default; | |
| 307 | 307 | } | |
| 308 | 308 | ||
| 309 | - return attr.AnalyzerWorkaround(); | ||
| 309 | + return attr; | ||
| 310 | 310 | } | |
| 311 | 311 | ||
| 312 | 312 | /// <summary> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -618,7 +618,7 @@ internal static NewReference ExtendTuple(BorrowedReference t, params PyObject[] | |||
| 618 | 618 | PyTuple_SetItem(items.Borrow(), size + n, args[n]); | |
| 619 | 619 | } | |
| 620 | 620 | ||
| 621 | - return items.AnalyzerWorkaround(); | ||
| 621 | + return items; | ||
| 622 | 622 | } | |
| 623 | 623 | ||
| 624 | 624 | internal static Type[]? PythonArgsToTypeArray(BorrowedReference arg) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments