--- parser3/src/classes/inet.C 2008/06/16 12:37:59 1.1 +++ parser3/src/classes/inet.C 2010/10/21 15:06:27 1.4 @@ -1,11 +1,11 @@ /** @file Parser: @b inet parser class. - Copyright(c) 2001-2005 ArtLebedev Group(http://www.artlebedev.com) + Copyright(c) 2001-2009 ArtLebedev Group(http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_INET_C="$Date: 2008/06/16 12:37:59 $"; +static const char * const IDENT_INET_C="$Date: 2010/10/21 15:06:27 $"; #include "pa_vmethod_frame.h" #include "pa_request.h" @@ -13,9 +13,6 @@ static const char * const IDENT_INET_C=" class MInet: public Methoded { public: MInet(); - -public: // Methoded - bool used_directly() { return true; } }; // global variables @@ -25,7 +22,7 @@ DECLARE_CLASS_VAR(inet, new MInet, 0); static void _ntoa(Request& r, MethodParams& params){ unsigned long l=(unsigned long)trunc(params.as_double(0, "parameter must be expression", r)); - static const int ip_cstr_bufsize=3*4+3+1; + static const int ip_cstr_bufsize=3*4+3+1+1; char* ip_cstr=new(PointerFreeGC) char[ip_cstr_bufsize]; snprintf(ip_cstr, ip_cstr_bufsize, "%u.%u.%u.%u", @@ -90,5 +87,5 @@ MInet::MInet(): Methoded("inet") { add_native_method("ntoa", Method::CT_STATIC, _ntoa, 1, 1); add_native_method("aton", Method::CT_STATIC, _aton, 1, 1); - // todo: gethostbyname, gethostbyaddr + // @todo: gethostbyname, gethostbyaddr }