mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.
This commit is contained in:
		
							parent
							
								
									2d391f2f39
								
							
						
					
					
						commit
						74a1e63a89
					
				
					 44 changed files with 223 additions and 223 deletions
				
			
		|  | @ -48,7 +48,7 @@ | |||
| 
 | ||||
| #define as_Control(h) ((ControlHandle)h) | ||||
| #define as_Resource(ctl) ((Handle)ctl) | ||||
| #ifdef TARGET_API_MAC_CARBON | ||||
| #if TARGET_API_MAC_CARBON | ||||
| #define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp) | ||||
| #else | ||||
| #define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect)) | ||||
|  | @ -83,7 +83,7 @@ | |||
| /* TrackControl and HandleControlClick callback support */ | ||||
| static PyObject *tracker; | ||||
| static ControlActionUPP mytracker_upp; | ||||
| #ifndef TARGET_API_MAC_CARBON_NOTYET | ||||
| #if !TARGET_API_MAC_CARBON_NOTYET | ||||
| static ControlUserPaneDrawUPP mydrawproc_upp; | ||||
| static ControlUserPaneIdleUPP myidleproc_upp; | ||||
| static ControlUserPaneHitTestUPP myhittestproc_upp; | ||||
|  | @ -92,7 +92,7 @@ | |||
| 
 | ||||
| extern int settrackfunc(PyObject *); 	/* forward */ | ||||
| extern void clrtrackfunc(void);	/* forward */ | ||||
| #ifndef TARGET_API_MAC_CARBON_NOTYET | ||||
| #if !TARGET_API_MAC_CARBON_NOTYET | ||||
| staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *); | ||||
| #endif | ||||
| """ | ||||
|  | @ -166,7 +166,7 @@ | |||
| 		PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n"); | ||||
| } | ||||
| 
 | ||||
| #ifndef TARGET_API_MAC_CARBON_NOTYET | ||||
| #if !TARGET_API_MAC_CARBON_NOTYET | ||||
| static int | ||||
| setcallback(myself, which, callback, uppp) | ||||
| 	PyObject *myself; | ||||
|  | @ -288,7 +288,7 @@ | |||
| 
 | ||||
| initstuff = initstuff + """ | ||||
| mytracker_upp = NewControlActionProc(mytracker); | ||||
| #ifndef TARGET_API_MAC_CARBON_NOTYET | ||||
| #if !TARGET_API_MAC_CARBON_NOTYET | ||||
| mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc); | ||||
| myidleproc_upp = NewControlUserPaneIdleProc(myidleproc); | ||||
| myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc); | ||||
|  | @ -570,7 +570,7 @@ def outputCleanupStructMembers(self): | |||
| return _res; | ||||
| """ | ||||
| 
 | ||||
| f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET"); | ||||
| f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET"); | ||||
| f.docstring = lambda: "(callbackfunc) -> None" | ||||
| object.add(f) | ||||
| 
 | ||||
|  | @ -588,7 +588,7 @@ def outputCleanupStructMembers(self): | |||
| HUnlock((Handle)hdl); | ||||
| return _res; | ||||
| """ | ||||
| f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET") | ||||
| f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET") | ||||
| object.add(f) | ||||
| 
 | ||||
| setpopupdata_body = """ | ||||
|  | @ -608,7 +608,7 @@ def outputCleanupStructMembers(self): | |||
| Py_INCREF(Py_None); | ||||
| return Py_None; | ||||
| """ | ||||
| f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET") | ||||
| f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET") | ||||
| object.add(f) | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jack Jansen
						Jack Jansen