mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	PyMapping_Keys and PyMapping_Values. Based on patch by Xiang Zhang.
This commit is contained in:
		
						commit
						4e3aab7c73
					
				
					 2 changed files with 13 additions and 14 deletions
				
			
		| 
						 | 
					@ -50,21 +50,20 @@ Mapping Protocol
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. c:function:: PyObject* PyMapping_Keys(PyObject *o)
 | 
					.. c:function:: PyObject* PyMapping_Keys(PyObject *o)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   On success, return a list, a tuple or a dictionary view in case of a dict,
 | 
					   On success, return a list or tuple of the keys in object *o*.  On failure,
 | 
				
			||||||
   of the keys in object *o*. On failure, return *NULL*.
 | 
					   return *NULL*.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. c:function:: PyObject* PyMapping_Values(PyObject *o)
 | 
					.. c:function:: PyObject* PyMapping_Values(PyObject *o)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   On success, return a list, a tuple or a dictionary view in case of a dict, of
 | 
					   On success, return a list or tuple of the values in object *o*.  On failure,
 | 
				
			||||||
   the values in object *o*. On failure, return *NULL*.
 | 
					   return *NULL*.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. c:function:: PyObject* PyMapping_Items(PyObject *o)
 | 
					.. c:function:: PyObject* PyMapping_Items(PyObject *o)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   On success, return a list, a tuple or a dictionary view in case of a dict, of
 | 
					   On success, return a list or tuple of the items in object *o*, where each item
 | 
				
			||||||
   the items in object *o*, where each item is a tuple containing a key-value
 | 
					   is a tuple containing a key-value pair.  On failure, return *NULL*.
 | 
				
			||||||
   pair.  On failure, return *NULL*.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key)
 | 
					.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1302,23 +1302,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
 | 
				
			||||||
     PyAPI_FUNC(PyObject *) PyMapping_Keys(PyObject *o);
 | 
					     PyAPI_FUNC(PyObject *) PyMapping_Keys(PyObject *o);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       /*
 | 
					       /*
 | 
				
			||||||
     On success, return a list, a tuple or a dictionary view in case of a dict,
 | 
					     On success, return a list or tuple of the keys in object o.
 | 
				
			||||||
     of the keys in object o. On failure, return NULL.
 | 
					     On failure, return NULL.
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     PyAPI_FUNC(PyObject *) PyMapping_Values(PyObject *o);
 | 
					     PyAPI_FUNC(PyObject *) PyMapping_Values(PyObject *o);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       /*
 | 
					       /*
 | 
				
			||||||
     On success, return a list, a tuple or a dictionary view in case of a dict,
 | 
					     On success, return a list or tuple of the values in object o.
 | 
				
			||||||
     of the values in object o. On failure, return NULL.
 | 
					     On failure, return NULL.
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     PyAPI_FUNC(PyObject *) PyMapping_Items(PyObject *o);
 | 
					     PyAPI_FUNC(PyObject *) PyMapping_Items(PyObject *o);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       /*
 | 
					       /*
 | 
				
			||||||
     On success, return a list, a tuple or a dictionary view in case of a dict,
 | 
					     On success, return a list or tuple of the items in object o,
 | 
				
			||||||
     of the items in object o, where each item is a tuple containing a key-value
 | 
					     where each item is a tuple containing a key-value pair.
 | 
				
			||||||
     pair. On failure, return NULL.
 | 
					     On failure, return NULL.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue