summaryrefslogtreecommitdiffstats
path: root/Modules/fmmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-03-16 12:15:04 (GMT)
committerGuido van Rossum <guido@python.org>1993-03-16 12:15:04 (GMT)
commite537240c252ff678d49451ee6f80fa934653a724 (patch)
treeb3dcbdb870e90f5843ac66f26a102ea4da444ff5 /Modules/fmmodule.c
parentf48b419a075dc237eb145e1b71cec12afdb7aff4 (diff)
downloadcpython-e537240c252ff678d49451ee6f80fa934653a724.zip
cpython-e537240c252ff678d49451ee6f80fa934653a724.tar.gz
cpython-e537240c252ff678d49451ee6f80fa934653a724.tar.bz2
* Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file. * modsupport.[ch]: added vmkvalue(). * intobject.c: use mkvalue(). * stringobject.c: added "formatstring"; renamed string* to string_*; ceval.c: call formatstring for string % value. * longobject.c: close memory leak in divmod. * parsetok.c: set result node to NULL when returning an error.
Diffstat (limited to 'Modules/fmmodule.c')
-rw-r--r--Modules/fmmodule.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c
index f3df6ce..8d54d97 100644
--- a/Modules/fmmodule.c
+++ b/Modules/fmmodule.c
@@ -1,6 +1,6 @@
/***********************************************************
-Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
-Netherlands.
+Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Amsterdam, The Netherlands.
All Rights Reserved
@@ -134,22 +134,15 @@ fh_getfontinfo(self, args)
err_setstr(RuntimeError, "error in fmgetfontinfo");
return NULL;
}
- v = newtupleobject(8);
- if (v == NULL)
- return NULL;
-#define SET(i, member) settupleitem(v, i, newintobject(info.member))
- SET(0, printermatched);
- SET(1, fixed_width);
- SET(2, xorig);
- SET(3, yorig);
- SET(4, xsize);
- SET(5, ysize);
- SET(6, height);
- SET(7, nglyphs);
-#undef SET
- if (err_occurred())
- return NULL;
- return v;
+ return mkvalue("(llllllll)",
+ info.printermatched,
+ info.fixed_width,
+ info.xorig,
+ info.yorig,
+ info.xsize,
+ info.ysize,
+ info.height,
+ info.nglyphs);
}
#if 0