--- parser3/src/classes/image.C 2002/04/10 09:53:14 1.69 +++ parser3/src/classes/image.C 2002/04/18 10:50:59 1.71 @@ -4,7 +4,7 @@ Copyright(c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: image.C,v 1.69 2002/04/10 09:53:14 paf Exp $ + $Id: image.C,v 1.71 2002/04/18 10:50:59 paf Exp $ */ /* @@ -25,10 +25,6 @@ #include "pa_vfile.h" #include "pa_vimage.h" -// defines - -#define IMAGE_CLASS_NAME "image" - // class class MImage : public Methoded { @@ -316,7 +312,7 @@ static void _html(Request& r, const Stri if(params->size()) { // for backward compatibility: someday was ^html{} Value &vattribs=r.process_to_value(params->get(0), - 0/*no name*/, + /*0/*no name* /,*/ false/*don't intercept string*/); if(vattribs.is_defined()) // allow 'void' if(attribs=vattribs.get_hash(&method_name)) { @@ -693,9 +689,7 @@ static void _length(Request& r, const St VImage& vimage=*static_cast(r.self); if(vimage.image) if(vimage.font) { - VInt& result=*new(pool) VInt(pool, vimage.font->string_width(s)); - result.set_name(method_name); - r.write_assign_lang(result); + r.write_no_lang(*new(pool) VInt(pool, vimage.font->string_width(s))); } else throw Exception("parser.runtime", &method_name, @@ -814,10 +808,7 @@ static void _copy(Request& r, const Stri // constructor -MImage::MImage(Pool& apool) : Methoded(apool) { - set_name(*NEW String(pool(), IMAGE_CLASS_NAME)); - - +MImage::MImage(Pool& apool) : Methoded(apool, "image") { // ^image:measure[DATA] add_native_method("measure", Method::CT_DYNAMIC, _measure, 1, 1);