gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/Date.cpp


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog server/asobj/Date.cpp
Date: Thu, 25 Oct 2007 15:35:36 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/10/25 15:35:36

Modified files:
        .              : ChangeLog 
        server/asobj   : Date.cpp 

Log message:
        server/asobj/Date.cpp: getTime() still has to return a numeric value

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4709&r2=1.4710
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.50&r2=1.51

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.4709
retrieving revision 1.4710
diff -u -b -r1.4709 -r1.4710
--- ChangeLog   25 Oct 2007 15:25:50 -0000      1.4709
+++ ChangeLog   25 Oct 2007 15:35:36 -0000      1.4710
@@ -4,6 +4,7 @@
          for SWF > 5 (fixes bug #21414)        
        * testsuite/actionscript.all/Date.as: 1 PASS
        * testsuite/actionscript.all/toString_valueOf.as: 2 PASSes
+       * server/asobj/Date.cpp: getTime() still has to return a numeric value 
 
 2007-10-25 Sandro Santilli <address@hidden>
 

Index: server/asobj/Date.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/asobj/Date.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- server/asobj/Date.cpp       25 Oct 2007 15:25:50 -0000      1.50
+++ server/asobj/Date.cpp       25 Oct 2007 15:35:36 -0000      1.51
@@ -229,7 +229,7 @@
 static as_value date_getminutes(const fn_call& fn);
 static as_value date_getmonth(const fn_call& fn);
 static as_value date_getseconds(const fn_call& fn);
-// static as_value date_gettime(const fn_call& fn); == date_valueof()
+static as_value date_gettime(const fn_call& fn); 
 static as_value date_gettimezoneoffset(const fn_call& fn);
 static as_value date_getutcdate(const fn_call& fn);
 static as_value date_getutcday(const fn_call& fn);
@@ -277,7 +277,7 @@
   o.init_member("getMinutes", new builtin_function(date_getminutes));
   o.init_member("getMonth", new builtin_function(date_getmonth));
   o.init_member("getSeconds", new builtin_function(date_getseconds));
-  o.init_member("getTime", new builtin_function(date_valueof));
+  o.init_member("getTime", new builtin_function(date_gettime));
   o.init_member("getTimezoneOffset", new 
builtin_function(date_gettimezoneoffset));
   o.init_member("getUTCDate", new builtin_function(date_getutcdate));
   o.init_member("getUTCDay", new builtin_function(date_getutcday));
@@ -1346,7 +1346,6 @@
 /// \brief Date.valueOf() returns the number of milliseconds since midnight
 /// January 1, 1970 00:00 UTC, for a Date. The return value can be a fractional
 /// number of milliseconds.
-// Also used to implement Date.getTime()
 
 static as_value date_valueof(const fn_call& fn) {
   boost::intrusive_ptr<date_as_object> date = 
ensureType<date_as_object>(fn.this_ptr);
@@ -1357,6 +1356,13 @@
     return as_value(date->value);
 }
 
+
+static as_value date_gettime(const fn_call& fn) {
+  boost::intrusive_ptr<date_as_object> date = 
ensureType<date_as_object>(fn.this_ptr);
+  
+  return as_value(date->value);
+}
+
 // extern (used by Global.cpp)
 void date_class_init(as_object& global)
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]