Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1d7b41

Browse files
committed
Disable GetWindowSpareFlag and GetWindowGoAwayBox on carbon.
1 parent 42efed0 commit f1d7b41

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Mac/Modules/win/Winmodule.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,8 @@ static PyObject *WinObj_GetAuxWin(_self, _args)
16371637
}
16381638
#endif
16391639

1640+
#if !TARGET_API_MAC_CARBON
1641+
16401642
static PyObject *WinObj_GetWindowGoAwayFlag(_self, _args)
16411643
WindowObject *_self;
16421644
PyObject *_args;
@@ -1650,6 +1652,9 @@ static PyObject *WinObj_GetWindowGoAwayFlag(_self, _args)
16501652
_rv);
16511653
return _res;
16521654
}
1655+
#endif
1656+
1657+
#if !TARGET_API_MAC_CARBON
16531658

16541659
static PyObject *WinObj_GetWindowSpareFlag(_self, _args)
16551660
WindowObject *_self;
@@ -1664,6 +1669,7 @@ static PyObject *WinObj_GetWindowSpareFlag(_self, _args)
16641669
_rv);
16651670
return _res;
16661671
}
1672+
#endif
16671673

16681674
static PyObject *WinObj_GetWindowPort(_self, _args)
16691675
WindowObject *_self;
@@ -2226,10 +2232,16 @@ static PyMethodDef WinObj_methods[] = {
22262232
{"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
22272233
"() -> (Boolean _rv, AuxWinHandle awHndl)"},
22282234
#endif
2235+
2236+
#if !TARGET_API_MAC_CARBON
22292237
{"GetWindowGoAwayFlag", (PyCFunction)WinObj_GetWindowGoAwayFlag, 1,
22302238
"() -> (Boolean _rv)"},
2239+
#endif
2240+
2241+
#if !TARGET_API_MAC_CARBON
22312242
{"GetWindowSpareFlag", (PyCFunction)WinObj_GetWindowSpareFlag, 1,
22322243
"() -> (Boolean _rv)"},
2244+
#endif
22332245
{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
22342246
"() -> (CGrafPtr _rv)"},
22352247
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,

Mac/Modules/win/winscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def makegreylist(self):
6868
'IsValidWindowPtr', # I think this is useless for Python, but not sure...
6969
'GetWindowZoomFlag', # Not available in Carbon
7070
'GetWindowTitleWidth', # Ditto
71+
'GetWindowGoAwayFlag',
72+
'GetWindowSpareFlag',
7173
]),
7274
('#if TARGET_API_MAC_CARBON', [
7375
'IsWindowUpdatePending',

0 commit comments

Comments
 (0)