*/
#define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL)
- int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result);
+ int PyObject_Cmp Py_PROTO((PyObject *o1, PyObject *o2, int *result));
/*
Compare the values of o1 and o2 using a routine provided by
*/
- int PyCallable_Check(PyObject *o);
+ int PyCallable_Check Py_PROTO((PyObject *o));
/*
Determine if the object, o, is callable. Return 1 if the
- PyObject *PyObject_CallObject(PyObject *callable_object, PyObject *args);
+ PyObject *PyObject_CallObject Py_PROTO((PyObject *callable_object,
+ PyObject *args));
/*
*/
- PyObject *PyObject_CallFunction(PyObject *callable_object, char *format, ...);
+ PyObject *PyObject_CallFunction Py_PROTO((PyObject *callable_object,
+ char *format, ...));
/*
Call a callable Python object, callable_object, with a
*/
- PyObject *PyObject_CallMethod(PyObject *o, char *m, char *format, ...);
+ PyObject *PyObject_CallMethod Py_PROTO((PyObject *o, char *m,
+ char *format, ...));
/*
Call the method named m of object o with a variable number of
*/
- PyObject *PyObject_Type(PyObject *o);
+ PyObject *PyObject_Type Py_PROTO((PyObject *o));
/*
On success, returns a type object corresponding to the object
equivalent to the Python expression: type(o).
*/
- int PyObject_Length(PyObject *o);
+ int PyObject_Length Py_PROTO((PyObject *o));
/*
Return the length of object o. If the object, o, provides
*/
- PyObject *PyObject_GetItem(PyObject *o, PyObject *key);
+ PyObject *PyObject_GetItem Py_PROTO((PyObject *o, PyObject *key));
/*
Return element of o corresponding to the object, key, or NULL
*/
- int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v);
+ int PyObject_SetItem Py_PROTO((PyObject *o, PyObject *key, PyObject *v));
/*
Map the object, key, to the value, v. Returns
/* Number Protocol:*/
- int PyNumber_Check(PyObject *o);
+ int PyNumber_Check Py_PROTO((PyObject *o));
/*
Returns 1 if the object, o, provides numeric protocols, and
*/
- PyObject *PyNumber_Add(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Add Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of adding o1 and o2, or null on failure.
*/
- PyObject *PyNumber_Subtract(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Subtract Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of subtracting o2 from o1, or null on
*/
- PyObject *PyNumber_Multiply(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Multiply Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of multiplying o1 and o2, or null on
*/
- PyObject *PyNumber_Divide(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Divide Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of dividing o1 by o2, or null on failure.
*/
- PyObject *PyNumber_Remainder(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Remainder Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the remainder of dividing o1 by o2, or null on
*/
- PyObject *PyNumber_Divmod(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Divmod Py_PROTO((PyObject *o1, PyObject *o2));
/*
See the built-in function divmod. Returns NULL on failure.
*/
- PyObject *PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3);
+ PyObject *PyNumber_Power Py_PROTO((PyObject *o1, PyObject *o2, PyObject *o3));
/*
See the built-in function pow. Returns NULL on failure.
*/
- PyObject *PyNumber_Negative(PyObject *o);
+ PyObject *PyNumber_Negative Py_PROTO((PyObject *o));
/*
Returns the negation of o on success, or null on failure.
*/
- PyObject *PyNumber_Positive(PyObject *o);
+ PyObject *PyNumber_Positive Py_PROTO((PyObject *o));
/*
Returns the (what?) of o on success, or NULL on failure.
*/
- PyObject *PyNumber_Absolute(PyObject *o);
+ PyObject *PyNumber_Absolute Py_PROTO((PyObject *o));
/*
Returns the absolute value of o, or null on failure. This is
*/
- PyObject *PyNumber_Invert(PyObject *o);
+ PyObject *PyNumber_Invert Py_PROTO((PyObject *o));
/*
Returns the bitwise negation of o on success, or NULL on
*/
- PyObject *PyNumber_Lshift(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Lshift Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of left shifting o1 by o2 on success, or
*/
- PyObject *PyNumber_Rshift(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Rshift Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of right shifting o1 by o2 on success, or
*/
- PyObject *PyNumber_And(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_And Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result of "anding" o2 and o2 on success and NULL
*/
- PyObject *PyNumber_Xor(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Xor Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the bitwise exclusive or of o1 by o2 on success, or
*/
- PyObject *PyNumber_Or(PyObject *o1, PyObject *o2);
+ PyObject *PyNumber_Or Py_PROTO((PyObject *o1, PyObject *o2));
/*
Returns the result or o1 and o2 on success, or NULL on
*/
- PyObject *PyNumber_Int(PyObject *o);
+ PyObject *PyNumber_Int Py_PROTO((PyObject *o));
/*
Returns the o converted to an integer object on success, or
*/
- PyObject *PyNumber_Long(PyObject *o);
+ PyObject *PyNumber_Long Py_PROTO((PyObject *o));
/*
Returns the o converted to a long integer object on success,
*/
- PyObject *PyNumber_Float(PyObject *o);
+ PyObject *PyNumber_Float Py_PROTO((PyObject *o));
/*
Returns the o converted to a float object on success, or NULL
/* Sequence protocol:*/
- int PySequence_Check(PyObject *o);
+ int PySequence_Check Py_PROTO((PyObject *o));
/*
Return 1 if the object provides sequence protocol, and zero
*/
- PyObject *PySequence_Concat(PyObject *o1, PyObject *o2);
+ PyObject *PySequence_Concat Py_PROTO((PyObject *o1, PyObject *o2));
/*
Return the concatination of o1 and o2 on success, and NULL on
*/
- PyObject *PySequence_Repeat(PyObject *o, int count);
+ PyObject *PySequence_Repeat Py_PROTO((PyObject *o, int count));
/*
Return the result of repeating sequence object o count times,
*/
- PyObject *PySequence_GetItem(PyObject *o, int i);
+ PyObject *PySequence_GetItem Py_PROTO((PyObject *o, int i));
/*
Return the ith element of o, or NULL on failure. This is the
*/
- PyObject *PySequence_GetSlice(PyObject *o, int i1, int i2);
+ PyObject *PySequence_GetSlice Py_PROTO((PyObject *o, int i1, int i2));
/*
Return the slice of sequence object o between i1 and i2, or
*/
- int PySequence_SetItem(PyObject *o, int i, PyObject *v);
+ int PySequence_SetItem Py_PROTO((PyObject *o, int i, PyObject *v));
/*
Assign object v to the ith element of o. Returns
*/
- int PySequence_SetSlice(PyObject *o, int i1, int i2, PyObject *v);
+ int PySequence_SetSlice Py_PROTO((PyObject *o, int i1, int i2, PyObject *v));
/*
Assign the sequence object, v, to the slice in sequence
equivalent of the Python statement: o[i1:i2]=v.
*/
- PyObject *PySequence_Tuple(PyObject *o);
+ PyObject *PySequence_Tuple Py_PROTO((PyObject *o));
/*
Returns the o as a tuple on success, and NULL on failure.
This is equivalent to the Python expression: tuple(o)
*/
- int PySequence_Count(PyObject *o, PyObject *value);
+ int PySequence_Count Py_PROTO((PyObject *o, PyObject *value));
/*
Return the number of occurrences on value on o, that is,
expression: o.count(value).
*/
- int PySequence_In(PyObject *o, PyObject *value);
+ int PySequence_In Py_PROTO((PyObject *o, PyObject *value));
/*
Determine if o contains value. If an item in o is equal to
is equivalent to the Python expression: value in o.
*/
- int PySequence_Index(PyObject *o, PyObject *value);
+ int PySequence_Index Py_PROTO((PyObject *o, PyObject *value));
/*
Return the first index for which o[i]=value. On error,
/* Mapping protocol:*/
- int PyMapping_Check(PyObject *o);
+ int PyMapping_Check Py_PROTO((PyObject *o));
/*
Return 1 if the object provides mapping protocol, and zero
This function always succeeds.
*/
- int PyMapping_Length(PyObject *o);
+ int PyMapping_Length Py_PROTO((PyObject *o));
/*
Returns the number of keys in object o on success, and -1 on
this is equivalent to the Python expression: len(o).
*/
- int PyMapping_DelItemString(PyObject *o, char *key);
+ int PyMapping_DelItemString Py_PROTO((PyObject *o, char *key));
/*
Remove the mapping for object, key, from the object *o.
the Python statement: del o[key].
*/
- int PyMapping_DelItem(PyObject *o, PyObject *key);
+ int PyMapping_DelItem Py_PROTO((PyObject *o, PyObject *key));
/*
Remove the mapping for object, key, from the object *o.
the Python statement: del o[key].
*/
- int PyMapping_HasKeyString(PyObject *o, char *key);
+ int PyMapping_HasKeyString Py_PROTO((PyObject *o, char *key));
/*
On success, return 1 if the mapping object has the key, key,
This function always succeeds.
*/
- int PyMapping_HasKey(PyObject *o, PyObject *key);
+ int PyMapping_HasKey Py_PROTO((PyObject *o, PyObject *key));
/*
Return 1 if the mapping object has the key, key,
*/
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
- PyObject *PyMapping_GetItemString(PyObject *o, char *key);
+ PyObject *PyMapping_GetItemString Py_PROTO((PyObject *o, char *key));
/*
Return element of o corresponding to the object, key, or NULL
o[key].
*/
- int PyMapping_SetItemString(PyObject *o, char *key, PyObject *value);
+ int PyMapping_SetItemString Py_PROTO((PyObject *o, char *key,
+ PyObject *value));
/*
Map the object, key, to the value, v. Returns
*/
+#ifdef __cplusplus
+}
+#endif
#endif /* Py_ABSTRACTOBJECT_H */