mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +03:00 
			
		
		
		
	define a "polyfill" inline for python 2 compatibility
This commit is contained in:
		
							parent
							
								
									852884e086
								
							
						
					
					
						commit
						3fcb035126
					
				| 
						 | 
				
			
			@ -93,6 +93,12 @@ error:
 | 
			
		|||
    return rv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef PyDateTime_DELTA_GET_DAYS
 | 
			
		||||
#define PyDateTime_DELTA_GET_DAYS(o) (o->days)
 | 
			
		||||
#define PyDateTime_DELTA_GET_SECONDS(o) (o->seconds)
 | 
			
		||||
#define PyDateTime_DELTA_GET_MICROSECONDS(o) (o->microseconds)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static PyObject *
 | 
			
		||||
_pydatetime_string_delta(pydatetimeObject *self)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user