[Python-checkins] r43099 - python/branches/p3yk/Include/abstract.h

neal.norwitz python-checkins at python.org
Fri Mar 17 07:58:52 CET 2006


Author: neal.norwitz
Date: Fri Mar 17 07:58:45 2006
New Revision: 43099

Modified:
   python/branches/p3yk/Include/abstract.h
Log:
Whitespace changes.  Also remove apply from a few comments

Modified: python/branches/p3yk/Include/abstract.h
==============================================================================
--- python/branches/p3yk/Include/abstract.h	(original)
+++ python/branches/p3yk/Include/abstract.h	Fri Mar 17 07:58:45 2006
@@ -290,35 +290,30 @@
 	 object is callable and 0 otherwise.
 
 	 This function always succeeds.
-
        */
 
-
-
      PyAPI_FUNC(PyObject *) PyObject_Call(PyObject *callable_object,
-					 PyObject *args, PyObject *kw);
+					  PyObject *args, PyObject *kw);
 
        /*
 	 Call a callable Python object, callable_object, with
 	 arguments and keywords arguments.  The 'args' argument can not be
 	 NULL, but the 'kw' argument can be NULL.
-
        */
      
      PyAPI_FUNC(PyObject *) PyObject_CallObject(PyObject *callable_object,
-                                               PyObject *args);
+                                                PyObject *args);
 
        /*
 	 Call a callable Python object, callable_object, with
 	 arguments given by the tuple, args.  If no arguments are
 	 needed, then args may be NULL.  Returns the result of the
 	 call on success, or NULL on failure.  This is the equivalent
-	 of the Python expression: apply(o,args).
-
+	 of the Python expression: o(*args).
        */
 
      PyAPI_FUNC(PyObject *) PyObject_CallFunction(PyObject *callable_object,
-                                                 char *format, ...);
+                                                  char *format, ...);
 
        /*
 	 Call a callable Python object, callable_object, with a
@@ -326,13 +321,12 @@
 	 using a mkvalue-style format string. The format may be NULL,
 	 indicating that no arguments are provided.  Returns the
 	 result of the call on success, or NULL on failure.  This is
-	 the equivalent of the Python expression: apply(o,args).
-
+	 the equivalent of the Python expression: o(*args).
        */
 
 
-     PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, char *m,
-                                               char *format, ...);
+     PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, char *method,
+                                                char *format, ...);
 
        /*
 	 Call the method named m of object o with a variable number of
@@ -345,19 +339,19 @@
 
 
      PyAPI_FUNC(PyObject *) PyObject_CallFunctionObjArgs(PyObject *callable,
-                                                        ...);
+                                                         ...);
 
        /*
 	 Call a callable Python object, callable_object, with a
 	 variable number of C arguments.  The C arguments are provided
 	 as PyObject * values, terminated by a NULL.  Returns the
 	 result of the call on success, or NULL on failure.  This is
-	 the equivalent of the Python expression: apply(o,args).
+	 the equivalent of the Python expression: o(*args).
        */
 
 
      PyAPI_FUNC(PyObject *) PyObject_CallMethodObjArgs(PyObject *o,
-                                                      PyObject *m, ...);
+                                                       PyObject *method, ...);
 
        /*
 	 Call the method named m of object o with a variable number of
@@ -375,7 +369,6 @@
          Compute and return the hash, hash_value, of an object, o.  On
 	 failure, return -1.  This is the equivalent of the Python
 	 expression: hash(o).
-
        */
 
 
@@ -386,7 +379,6 @@
 	 Returns 1 if the object, o, is considered to be true, 0 if o is
 	 considered to be false and -1 on failure. This is equivalent to the
 	 Python expression: not not o
-
        */
 
      /* Implemented elsewhere:
@@ -396,7 +388,6 @@
 	 Returns 0 if the object, o, is considered to be true, 1 if o is
 	 considered to be false and -1 on failure. This is equivalent to the
 	 Python expression: not o
-
        */
 
      PyAPI_FUNC(PyObject *) PyObject_Type(PyObject *o);
@@ -414,7 +405,6 @@
 	 both sequence and mapping protocols, the sequence size is
 	 returned. On error, -1 is returned.  This is the equivalent
 	 to the Python expression: len(o).
-
        */
 
        /* For DLL compatibility */
@@ -449,7 +439,6 @@
 	 Return element of o corresponding to the object, key, or NULL
 	 on failure. This is the equivalent of the Python expression:
 	 o[key].
-
        */
 
      PyAPI_FUNC(int) PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v);
@@ -476,8 +465,8 @@
        */
 
      PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
-					  const char **buffer,
-					  Py_ssize_t *buffer_len);
+					   const char **buffer,
+					   Py_ssize_t *buffer_len);
 
        /* 
 	  Takes an arbitrary object which must support the (character,
@@ -488,7 +477,6 @@
 	  0 is returned on success.  buffer and buffer_len are only
 	  set in case no error occurs. Otherwise, -1 is returned and
 	  an exception set.
-
        */
 
      PyAPI_FUNC(int) PyObject_CheckReadBuffer(PyObject *obj);
@@ -497,12 +485,11 @@
 	  Checks whether an arbitrary object supports the (character,
 	  single segment) buffer interface.  Returns 1 on success, 0
 	  on failure.
-
       */
 
      PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
-					  const void **buffer,
-					  Py_ssize_t *buffer_len);
+					   const void **buffer,
+					   Py_ssize_t *buffer_len);
 
        /* 
 	  Same as PyObject_AsCharBuffer() except that this API expects
@@ -513,12 +500,11 @@
 	  0 is returned on success.  buffer and buffer_len are only
 	  set in case no error occurrs.  Otherwise, -1 is returned and
 	  an exception set.
-
        */
 
      PyAPI_FUNC(int) PyObject_AsWriteBuffer(PyObject *obj,
-					   void **buffer,
-					   Py_ssize_t *buffer_len);
+					    void **buffer,
+					    Py_ssize_t *buffer_len);
 
        /* 
 	  Takes an arbitrary object which must support the (writeable,
@@ -528,7 +514,6 @@
 	  0 is returned on success.  buffer and buffer_len are only
 	  set in case no error occurrs. Otherwise, -1 is returned and
 	  an exception set.
-
        */
 
 /* Iterators */
@@ -557,7 +542,6 @@
 	 false otherwise. 
 
 	 This function always succeeds.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Add(PyObject *o1, PyObject *o2);
@@ -565,8 +549,6 @@
        /*
 	 Returns the result of adding o1 and o2, or null on failure.
 	 This is the equivalent of the Python expression: o1+o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Subtract(PyObject *o1, PyObject *o2);
@@ -575,7 +557,6 @@
 	 Returns the result of subtracting o2 from o1, or null on
 	 failure.  This is the equivalent of the Python expression:
 	 o1-o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Multiply(PyObject *o1, PyObject *o2);
@@ -584,8 +565,6 @@
 	 Returns the result of multiplying o1 and o2, or null on
 	 failure.  This is the equivalent of the Python expression:
 	 o1*o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Divide(PyObject *o1, PyObject *o2);
@@ -593,8 +572,6 @@
        /*
 	 Returns the result of dividing o1 by o2, or null on failure.
 	 This is the equivalent of the Python expression: o1/o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_FloorDivide(PyObject *o1, PyObject *o2);
@@ -603,8 +580,6 @@
 	 Returns the result of dividing o1 by o2 giving an integral result,
 	 or null on failure.
 	 This is the equivalent of the Python expression: o1//o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_TrueDivide(PyObject *o1, PyObject *o2);
@@ -613,8 +588,6 @@
 	 Returns the result of dividing o1 by o2 giving a float result,
 	 or null on failure.
 	 This is the equivalent of the Python expression: o1/o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Remainder(PyObject *o1, PyObject *o2);
@@ -623,8 +596,6 @@
 	 Returns the remainder of dividing o1 by o2, or null on
 	 failure.  This is the equivalent of the Python expression:
 	 o1%o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Divmod(PyObject *o1, PyObject *o2);
@@ -633,18 +604,15 @@
 	 See the built-in function divmod.  Returns NULL on failure.
 	 This is the equivalent of the Python expression:
 	 divmod(o1,o2).
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Power(PyObject *o1, PyObject *o2,
-                                          PyObject *o3);
+                                           PyObject *o3);
 
        /*
 	 See the built-in function pow.  Returns NULL on failure.
 	 This is the equivalent of the Python expression:
 	 pow(o1,o2,o3), where o3 is optional.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Negative(PyObject *o);
@@ -652,7 +620,6 @@
        /*
 	 Returns the negation of o on success, or null on failure.
 	 This is the equivalent of the Python expression: -o.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Positive(PyObject *o);
@@ -660,7 +627,6 @@
        /*
          Returns the (what?) of o on success, or NULL on failure.
 	 This is the equivalent of the Python expression: +o.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Absolute(PyObject *o);
@@ -668,7 +634,6 @@
        /*
 	 Returns the absolute value of o, or null on failure.  This is
 	 the equivalent of the Python expression: abs(o).
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Invert(PyObject *o);
@@ -677,8 +642,6 @@
 	 Returns the bitwise negation of o on success, or NULL on
 	 failure.  This is the equivalent of the Python expression:
 	 ~o.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Lshift(PyObject *o1, PyObject *o2);
@@ -687,8 +650,6 @@
 	 Returns the result of left shifting o1 by o2 on success, or
 	 NULL on failure.  This is the equivalent of the Python
 	 expression: o1 << o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Rshift(PyObject *o1, PyObject *o2);
@@ -697,7 +658,6 @@
 	 Returns the result of right shifting o1 by o2 on success, or
 	 NULL on failure.  This is the equivalent of the Python
 	 expression: o1 >> o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_And(PyObject *o1, PyObject *o2);
@@ -707,7 +667,6 @@
 	 NULL on failure. This is the equivalent of the Python
 	 expression: o1&o2.
 
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Xor(PyObject *o1, PyObject *o2);
@@ -716,8 +675,6 @@
 	 Returns the bitwise exclusive or of o1 by o2 on success, or
 	 NULL on failure.  This is the equivalent of the Python
 	 expression: o1^o2.
-
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2);
@@ -726,7 +683,6 @@
 	 Returns the result of bitwise or on o1 and o2 on success, or
 	 NULL on failure.  This is the equivalent of the Python
 	 expression: o1|o2.
-
        */
 
      /* Implemented elsewhere:
@@ -745,7 +701,6 @@
 	 return -1 (failure) and don't increment the reference counts.
 	 The call PyNumber_Coerce(&o1, &o2) is equivalent to the Python
 	 statement o1, o2 = coerce(o1, o2).
-
        */
 
      PyAPI_FUNC(Py_ssize_t) PyNumber_Index(PyObject *);
@@ -762,7 +717,6 @@
 	 Returns the o converted to an integer object on success, or
 	 NULL on failure.  This is the equivalent of the Python
 	 expression: int(o).
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o);
@@ -771,7 +725,6 @@
 	 Returns the o converted to a long integer object on success,
 	 or NULL on failure.  This is the equivalent of the Python
 	 expression: long(o).
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_Float(PyObject *o);
@@ -790,7 +743,6 @@
 	 Returns the result of adding o2 to o1, possibly in-place, or null
 	 on failure.  This is the equivalent of the Python expression:
 	 o1 += o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2);
@@ -799,7 +751,6 @@
 	 Returns the result of subtracting o2 from o1, possibly in-place or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 -= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2);
@@ -808,7 +759,6 @@
 	 Returns the result of multiplying o1 by o2, possibly in-place, or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 *= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2);
@@ -817,29 +767,26 @@
 	 Returns the result of dividing o1 by o2, possibly in-place, or null
 	 on failure.  This is the equivalent of the Python expression:
 	 o1 /= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceFloorDivide(PyObject *o1,
-						       PyObject *o2);
+						        PyObject *o2);
 
        /*
 	 Returns the result of dividing o1 by o2 giving an integral result,
 	 possibly in-place, or null on failure.
 	 This is the equivalent of the Python expression:
 	 o1 /= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceTrueDivide(PyObject *o1,
-						      PyObject *o2);
+						       PyObject *o2);
 
        /*
 	 Returns the result of dividing o1 by o2 giving a float result,
 	 possibly in-place, or null on failure.
 	 This is the equivalent of the Python expression:
 	 o1 /= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2);
@@ -848,17 +795,15 @@
 	 Returns the remainder of dividing o1 by o2, possibly in-place, or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 %= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlacePower(PyObject *o1, PyObject *o2,
-     						 PyObject *o3);
+     						  PyObject *o3);
 
        /*
 	 Returns the result of raising o1 to the power of o2, possibly
 	 in-place, or null on failure.  This is the equivalent of the Python
 	 expression: o1 **= o2, or pow(o1, o2, o3) if o3 is present.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2);
@@ -867,7 +812,6 @@
 	 Returns the result of left shifting o1 by o2, possibly in-place, or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 <<= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2);
@@ -876,7 +820,6 @@
 	 Returns the result of right shifting o1 by o2, possibly in-place or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 >>= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2);
@@ -885,7 +828,6 @@
 	 Returns the result of bitwise and of o1 and o2, possibly in-place,
 	 or null on failure. This is the equivalent of the Python
 	 expression: o1 &= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceXor(PyObject *o1, PyObject *o2);
@@ -894,7 +836,6 @@
 	 Returns the bitwise exclusive or of o1 by o2, possibly in-place, or
 	 null on failure.  This is the equivalent of the Python expression:
 	 o1 ^= o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PyNumber_InPlaceOr(PyObject *o1, PyObject *o2);
@@ -903,7 +844,6 @@
 	 Returns the result of bitwise or of o1 and o2, possibly in-place,
 	 or null on failure.  This is the equivalent of the Python
 	 expression: o1 |= o2.
-
        */
 
 
@@ -916,14 +856,12 @@
 	 otherwise.  
 
 	 This function always succeeds.
-
        */
 
      PyAPI_FUNC(Py_ssize_t) PySequence_Size(PyObject *o);
 
        /*
          Return the size of sequence object o, or -1 on failure.
-
        */
 
        /* For DLL compatibility */
@@ -938,7 +876,6 @@
 	 Return the concatenation of o1 and o2 on success, and NULL on
 	 failure.   This is the equivalent of the Python
 	 expression: o1+o2.
-
        */
 
      PyAPI_FUNC(PyObject *) PySequence_Repeat(PyObject *o, Py_ssize_t count);
@@ -947,7 +884,6 @@
 	 Return the result of repeating sequence object o count times,
 	 or NULL on failure.  This is the equivalent of the Python
 	 expression: o1*count.
-
        */
 
      PyAPI_FUNC(PyObject *) PySequence_GetItem(PyObject *o, Py_ssize_t i);
@@ -963,7 +899,6 @@
 	 Return the slice of sequence object o between i1 and i2, or
 	 NULL on failure. This is the equivalent of the Python
 	 expression: o[i1:i2].
-
        */
 
      PyAPI_FUNC(int) PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v);
@@ -972,7 +907,6 @@
 	 Assign object v to the ith element of o.  Returns
 	 -1 on failure.  This is the equivalent of the Python
 	 statement: o[i]=v.
-
        */
 
      PyAPI_FUNC(int) PySequence_DelItem(PyObject *o, Py_ssize_t i);
@@ -984,7 +918,7 @@
        */
 
      PyAPI_FUNC(int) PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2,
-                                        PyObject *v);
+                                         PyObject *v);
 
        /*
          Assign the sequence object, v, to the slice in sequence


More information about the Python-checkins mailing list