[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/GetterSetter.cpp server/...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/GetterSetter.cpp server/... |
Date: |
Thu, 26 Oct 2006 22:29:15 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/10/26 22:29:15
Modified files:
. : ChangeLog
server : GetterSetter.cpp GetterSetter.h
Log message:
* server/GetterSetter.{cpp,h}: getValue/setValue method made
const
(problems with const-correctness of as_function are handled in
the implementation file with use of const_cast<>)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1408&r2=1.1409
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GetterSetter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GetterSetter.h?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1408
retrieving revision 1.1409
diff -u -b -r1.1408 -r1.1409
--- ChangeLog 26 Oct 2006 22:27:22 -0000 1.1408
+++ ChangeLog 26 Oct 2006 22:29:15 -0000 1.1409
@@ -1,5 +1,8 @@
2006-10-26 Sandro Santilli <address@hidden>
+ * server/GetterSetter.{cpp,h}: getValue/setValue method made const
+ (problems with const-correctness of as_function are handled in
+ the implementation file with use of const_cast<>)
* server/: Makefile.am, Property.h: new class for properties,
obsoletes as_member.
Index: server/GetterSetter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/GetterSetter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GetterSetter.cpp 26 Oct 2006 20:38:31 -0000 1.1
+++ server/GetterSetter.cpp 26 Oct 2006 22:29:15 -0000 1.2
@@ -53,20 +53,22 @@
namespace gnash {
void
-GetterSetter::getValue(as_object* this_ptr, as_value& ret)
+GetterSetter::getValue(as_object* this_ptr, as_value& ret) const
{
as_environment env;
fn_call fn(&ret, this_ptr, &env, 0, 0);
- (*_getter)(fn);
+ // TODO: need as_function::operator to be const..
+ (*const_cast<as_function*>(_getter))(fn);
}
void
-GetterSetter::setValue(as_object* this_ptr, const as_value& val)
+GetterSetter::setValue(as_object* this_ptr, const as_value& val) const
{
as_environment env;
env.push(val);
fn_call fn(NULL, this_ptr, &env, 1, 0);
- (*_setter)(fn);
+ // TODO: need as_function::operator to be const..
+ (*const_cast<as_function*>(_setter))(fn);
}
GetterSetter&
Index: server/GetterSetter.h
===================================================================
RCS file: /sources/gnash/gnash/server/GetterSetter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GetterSetter.h 26 Oct 2006 20:38:31 -0000 1.1
+++ server/GetterSetter.h 26 Oct 2006 22:29:15 -0000 1.2
@@ -88,11 +88,11 @@
/// call drop_ref on both getter/setter as_functions
~GetterSetter();
- // TODO: make const (need as_function::operator is also const..)
- void getValue(as_object* this_ptr, as_value& ret);
+ /// invoke the getter function
+ void getValue(as_object* this_ptr, as_value& ret) const;
- // TODO: make const (need as_function::operator is also const..)
- void setValue(as_object* this_ptr, const as_value& val);
+ /// invoke the setter function
+ void setValue(as_object* this_ptr, const as_value& val) const;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/GetterSetter.cpp server/...,
Sandro Santilli <=