summaryrefslogtreecommitdiffstats
path: root/Modules/flmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-03-30 13:18:41 (GMT)
committerGuido van Rossum <guido@python.org>1993-03-30 13:18:41 (GMT)
commit8b17d6bd89cd79820c76bd88bc064e44fc03a1bd (patch)
tree3d8fd0cc9e8401bdd79980b52db03bfe3b2431e8 /Modules/flmodule.c
parent0023078a0b751260acdee7be0b029335f7efe888 (diff)
downloadcpython-8b17d6bd89cd79820c76bd88bc064e44fc03a1bd.zip
cpython-8b17d6bd89cd79820c76bd88bc064e44fc03a1bd.tar.gz
cpython-8b17d6bd89cd79820c76bd88bc064e44fc03a1bd.tar.bz2
Changes to speed up local variables enormously, by avoiding dictionary
lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
Diffstat (limited to 'Modules/flmodule.c')
-rw-r--r--Modules/flmodule.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/flmodule.c b/Modules/flmodule.c
index 00cf12c..3d424d1 100644
--- a/Modules/flmodule.c
+++ b/Modules/flmodule.c
@@ -1201,6 +1201,14 @@ get_menu (g, args)
}
static object *
+get_menu_text (g, args)
+ genericobject *g;
+ object *args;
+{
+ return call_forms_Rstr (fl_get_menu_text, g-> ob_generic, args);
+}
+
+static object *
addto_menu (g, args)
genericobject *g;
object *args;
@@ -1211,6 +1219,7 @@ addto_menu (g, args)
static struct methodlist menu_methods[] = {
{"set_menu", set_menu},
{"get_menu", get_menu},
+ {"get_menu_text", get_menu_text},
{"addto_menu", addto_menu},
{NULL, NULL} /* sentinel */
};