summaryrefslogtreecommitdiffstats
path: root/generic/tclOOBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2024-01-28 19:15:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2024-01-28 19:15:28 (GMT)
commit71180305d2a85f9bec0b5eafb9705d4b13f5ba10 (patch)
treed173ef618eccf4ac93d786bd7a49e2f32094aa0a /generic/tclOOBasic.c
parent19cb1decae47b6a5c4ebbb6414be019e12aa3476 (diff)
downloadtcl-71180305d2a85f9bec0b5eafb9705d4b13f5ba10.zip
tcl-71180305d2a85f9bec0b5eafb9705d4b13f5ba10.tar.gz
tcl-71180305d2a85f9bec0b5eafb9705d4b13f5ba10.tar.bz2
Property implementation 'definitions', not yet plumbed into documented API
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r--generic/tclOOBasic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index f8c9eb5..2b4f220 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -1778,19 +1778,19 @@ static Tcl_MethodType SetterType = {
void
TclOOImplementObjectProperty(
Tcl_Object targetObject,
- Tcl_Obj *propNamePtr,
+ Tcl_Obj *propNamePtr, /* Property name, without leading - */
int installGetter,
int installSetter)
{
if (installGetter) {
- Tcl_Obj *methodName = Tcl_ObjPrintf("<ReadProp%s>", TclGetString(propNamePtr));
+ Tcl_Obj *methodName = Tcl_ObjPrintf("<ReadProp-%s>", TclGetString(propNamePtr));
Tcl_IncrRefCount(methodName);
Tcl_IncrRefCount(propNamePtr);
TclNewInstanceMethod(NULL, targetObject, methodName, 0, &GetterType, propNamePtr);
Tcl_DecrRefCount(methodName);
}
if (installSetter) {
- Tcl_Obj *methodName = Tcl_ObjPrintf("<WriteProp%s>", TclGetString(propNamePtr));
+ Tcl_Obj *methodName = Tcl_ObjPrintf("<WriteProp-%s>", TclGetString(propNamePtr));
Tcl_IncrRefCount(methodName);
Tcl_IncrRefCount(propNamePtr);
TclNewInstanceMethod(NULL, targetObject, methodName, 0, &SetterType, propNamePtr);
@@ -1801,19 +1801,19 @@ TclOOImplementObjectProperty(
void
TclOOImplementClassProperty(
Tcl_Class targetClass,
- Tcl_Obj *propNamePtr,
+ Tcl_Obj *propNamePtr, /* Property name, without leading - */
int installGetter,
int installSetter)
{
if (installGetter) {
- Tcl_Obj *methodName = Tcl_ObjPrintf("<ReadProp%s>", TclGetString(propNamePtr));
+ Tcl_Obj *methodName = Tcl_ObjPrintf("<ReadProp-%s>", TclGetString(propNamePtr));
Tcl_IncrRefCount(methodName);
Tcl_IncrRefCount(propNamePtr);
TclNewMethod(NULL, targetClass, methodName, 0, &GetterType, propNamePtr);
Tcl_DecrRefCount(methodName);
}
if (installSetter) {
- Tcl_Obj *methodName = Tcl_ObjPrintf("<WriteProp%s>", TclGetString(propNamePtr));
+ Tcl_Obj *methodName = Tcl_ObjPrintf("<WriteProp-%s>", TclGetString(propNamePtr));
Tcl_IncrRefCount(methodName);
Tcl_IncrRefCount(propNamePtr);
TclNewMethod(NULL, targetClass, methodName, 0, &SetterType, propNamePtr);