X Tutup
Skip to content

Commit 6ce9b53

Browse files
committed
Documentation clean-up
1 parent b823400 commit 6ce9b53

File tree

5 files changed

+10
-82
lines changed

5 files changed

+10
-82
lines changed

src/runtime/classmanager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Python.Runtime
1010
/// <summary>
1111
/// The ClassManager is responsible for creating and managing instances
1212
/// that implement the Python type objects that reflect managed classes.
13-
///
1413
/// Each managed type reflected to Python is represented by an instance
1514
/// of a concrete subclass of ClassBase. Each instance is associated with
1615
/// a generated Python type object, whose slots point to static methods

src/runtime/constructorbinding.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ namespace Python.Runtime
99
/// </summary>
1010
/// <remarks>
1111
/// ClassManager stores a ConstructorBinding instance in the class's __dict__['Overloads']
12-
///
1312
/// SomeType.Overloads[Type, ...] works like this:
1413
/// 1) Python retreives the Overloads attribute from this ClassObject's dictionary normally
1514
/// and finds a non-null tp_descr_get slot which is called by the interpreter
1615
/// and returns an IncRef()ed pyHandle to itself.
1716
/// 2) The ConstructorBinding object handles the [] syntax in its mp_subscript by matching
1817
/// the Type object parameters to a contructor overload using Type.GetConstructor()
19-
/// [NOTE: I don't know why method overloads are not searched the same way.]
18+
/// [NOTE: I don't know why method overloads are not searched the same way.]
2019
/// and creating the BoundContructor oject which contains ContructorInfo object.
2120
/// 3) In tp_call, if ctorInfo is not null, ctorBinder.InvokeRaw() is called.
2221
/// </remarks>
@@ -43,12 +42,15 @@ public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBi
4342
/// selection.
4443
/// </summary>
4544
/// <param name="op"> PyObject* to a Constructors wrapper </param>
46-
/// <param name="instance"> the instance that the attribute was accessed through,
47-
/// or None when the attribute is accessed through the owner </param>
45+
/// <param name="instance">
46+
/// the instance that the attribute was accessed through,
47+
/// or None when the attribute is accessed through the owner
48+
/// </param>
4849
/// <param name="owner"> always the owner class </param>
49-
/// <returns> a CtorMapper (that borrows a reference to this python type and the
50-
/// ClassObject's ConstructorBinder) wrapper. </returns>
51-
///
50+
/// <returns>
51+
/// a CtorMapper (that borrows a reference to this python type and the
52+
/// ClassObject's ConstructorBinder) wrapper.
53+
/// </returns>
5254
/// <remarks>
5355
/// Python 2.6.5 docs:
5456
/// object.__get__(self, instance, owner)

src/runtime/exceptions.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ internal unsafe static void ErrorCheck(IntPtr pointer)
183183
}
184184

185185
/// <summary>
186-
/// Shortcut for (pointer == NULL or ErrorOccurred()) -> throw PythonException
186+
/// Shortcut for (pointer == NULL or ErrorOccurred()) -&gt; throw PythonException
187187
/// </summary>
188-
/// Shortcut for (pointer == NULL) -> throw PythonException
189188
internal unsafe static void ErrorOccurredCheck(IntPtr pointer)
190189
{
191190
if ((pointer == IntPtr.Zero) || Exceptions.ErrorOccurred())
@@ -197,7 +196,6 @@ internal unsafe static void ErrorOccurredCheck(IntPtr pointer)
197196
/// <summary>
198197
/// ExceptionMatches Method
199198
/// </summary>
200-
///
201199
/// <remarks>
202200
/// Returns true if the current Python exception matches the given
203201
/// Python object. This is a wrapper for PyErr_ExceptionMatches.
@@ -210,7 +208,6 @@ public static bool ExceptionMatches(IntPtr ob)
210208
/// <summary>
211209
/// ExceptionMatches Method
212210
/// </summary>
213-
///
214211
/// <remarks>
215212
/// Returns true if the given Python exception matches the given
216213
/// Python object. This is a wrapper for PyErr_GivenExceptionMatches.
@@ -224,7 +221,6 @@ public static bool ExceptionMatches(IntPtr exc, IntPtr ob)
224221
/// <summary>
225222
/// SetError Method
226223
/// </summary>
227-
///
228224
/// <remarks>
229225
/// Sets the current Python exception given a native string.
230226
/// This is a wrapper for the Python PyErr_SetString call.
@@ -237,7 +233,6 @@ public static void SetError(IntPtr ob, string value)
237233
/// <summary>
238234
/// SetError Method
239235
/// </summary>
240-
///
241236
/// <remarks>
242237
/// Sets the current Python exception given a Python object.
243238
/// This is a wrapper for the Python PyErr_SetObject call.
@@ -250,7 +245,6 @@ public static void SetError(IntPtr ob, IntPtr value)
250245
/// <summary>
251246
/// SetError Method
252247
/// </summary>
253-
///
254248
/// <remarks>
255249
/// Sets the current Python exception given a CLR exception
256250
/// object. The CLR exception instance is wrapped as a Python
@@ -280,7 +274,6 @@ public static void SetError(Exception e)
280274
/// <summary>
281275
/// ErrorOccurred Method
282276
/// </summary>
283-
///
284277
/// <remarks>
285278
/// Returns true if an exception occurred in the Python runtime.
286279
/// This is a wrapper for the Python PyErr_Occurred call.
@@ -293,7 +286,6 @@ public static bool ErrorOccurred()
293286
/// <summary>
294287
/// Clear Method
295288
/// </summary>
296-
///
297289
/// <remarks>
298290
/// Clear any exception that has been set in the Python runtime.
299291
/// </remarks>

0 commit comments

Comments
 (0)
X Tutup