annotate Modules/tkinter.h @ 87690:66c1c9f32567 default tip

Add use_weakref option to functools.lru_cache The use_weakref option makes lru_cache create weak references to the function arguments when creating the cache key, which prevents them from staying in the memory forever even after all other references to them are gone. This is a proof of concept for http://bugs.python.org/issue19859
author Radomir Dopieralski <devel@sheep.art.pl>
date Tue, 03 Dec 2013 16:02:48 +0100
parents 06b64178a30d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51502
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
1 #ifndef TKINTER_H
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
2 #define TKINTER_H
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
3
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
4 /* This header is used to share some macros between _tkinter.c and
53044
06b64178a30d Merged revisions 71210 via svnmerge from
Guilherme Polo <ggpolo@gmail.com>
parents: 51502
diff changeset
5 * tkappinit.c.
06b64178a30d Merged revisions 71210 via svnmerge from
Guilherme Polo <ggpolo@gmail.com>
parents: 51502
diff changeset
6 * Be sure to include tk.h before including this header so
06b64178a30d Merged revisions 71210 via svnmerge from
Guilherme Polo <ggpolo@gmail.com>
parents: 51502
diff changeset
7 * TK_VERSION_HEX is properly defined. */
51502
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
8
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
9 /* TK_RELEASE_LEVEL is always one of the following:
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
10 * TCL_ALPHA_RELEASE 0
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
11 * TCL_BETA_RELEASE 1
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
12 * TCL_FINAL_RELEASE 2
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
13 */
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
14 #define TK_VERSION_HEX ((TK_MAJOR_VERSION << 24) | \
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
15 (TK_MINOR_VERSION << 16) | \
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
16 (TK_RELEASE_SERIAL << 8) | \
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
17 (TK_RELEASE_LEVEL << 0))
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
18
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
19 /* Protect Tk 8.4.13 and older from a deadlock that happens when trying
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
20 * to load tk after a failed attempt. */
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
21 #if TK_VERSION_HEX < 0x08040e02
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
22 #define TKINTER_PROTECT_LOADTK
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
23 #define TKINTER_LOADTK_ERRMSG \
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
24 "Calling Tk_Init again after a previous call failed might deadlock"
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
25 #endif
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
26
ac9ef7431c8f This header was supposed to be committed in r69476
Guilherme Polo <ggpolo@gmail.com>
parents:
diff changeset
27 #endif /* !TKINTER_H */