From d8a98913e8368187431b04e588bc0a821633c5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 13 May 1998 20:47:48 +0200 Subject: [PATCH] Now uses add_integer_constant() to add the JDCT constants. Rev: src/modules/_Image_JPEG/image_jpeg.c:1.17 --- src/modules/_Image_JPEG/image_jpeg.c | 33 ++++++---------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/src/modules/_Image_JPEG/image_jpeg.c b/src/modules/_Image_JPEG/image_jpeg.c index 27ddd9d3f0..2dc08f112c 100644 --- a/src/modules/_Image_JPEG/image_jpeg.c +++ b/src/modules/_Image_JPEG/image_jpeg.c @@ -1,5 +1,5 @@ /* - * $Id: image_jpeg.c,v 1.16 1998/05/01 23:22:33 grubba Exp $ + * $Id: image_jpeg.c,v 1.17 1998/05/13 18:47:48 grubba Exp $ */ #include "config.h" @@ -22,7 +22,7 @@ #undef HAVE_STDLIB_H #endif #include "global.h" -RCSID("$Id: image_jpeg.c,v 1.16 1998/05/01 23:22:33 grubba Exp $"); +RCSID("$Id: image_jpeg.c,v 1.17 1998/05/13 18:47:48 grubba Exp $"); #include "pike_macros.h" #include "object.h" @@ -619,30 +619,11 @@ void pike_module_init(void) add_function("encode",image_jpeg_encode, "function(object,void|mapping(string:int):string)",0); - push_constant_text("IFAST"); - push_int(JDCT_IFAST); - add_constant(sp[-2].u.string,sp-1,0); - pop_n_elems(2); - - push_constant_text("FLOAT"); - push_int(JDCT_FLOAT); - add_constant(sp[-2].u.string,sp-1,0); - pop_n_elems(2); - - push_constant_text("DEFAULT"); - push_int(JDCT_DEFAULT); - add_constant(sp[-2].u.string,sp-1,0); - pop_n_elems(2); - - push_constant_text("ISLOW"); - push_int(JDCT_ISLOW); - add_constant(sp[-2].u.string,sp-1,0); - pop_n_elems(2); - - push_constant_text("FASTEST"); - push_int(JDCT_FASTEST); - add_constant(sp[-2].u.string,sp-1,0); - pop_n_elems(2); + add_integer_constant("IFAST", JDCT_IFAST, 0); + add_integer_constant("FLOAT", JDCT_FLOAT, 0); + add_integer_constant("DEFAULT", JDCT_DEFAULT, 0); + add_integer_constant("ISLOW", JDCT_ISLOW, 0); + add_integer_constant("FASTEST", JDCT_FASTEST, 0); } #endif /* HAVE_JPEGLIB_H */ -- GitLab