add missing checks on pen-mutation methods

svn: r15591
This commit is contained in:
Matthew Flatt 2009-07-28 00:04:38 +00:00
parent fa13bbb72b
commit 07503f5c35
2 changed files with 6 additions and 6 deletions

View File

@ -2837,7 +2837,7 @@ static Scheme_Object *os_wxPenSetJoin(int n, Scheme_Object *p[])
x0 = WITH_VAR_STACK(unbundle_symset_join(p[POFFSET+0], "set-join in pen%")); x0 = WITH_VAR_STACK(unbundle_symset_join(p[POFFSET+0], "set-join in pen%"));
if (!((wxPen *)((Scheme_Class_Object *)THEOBJ)->primdata)->IsMutable()) WITH_VAR_STACK(scheme_signal_error("%s: this %s%% object is locked (in use by a dc<%%> object or in a list of %s constants)", METHODNAME("pen%","set-join"), "pen", "pen"));
WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetJoin(x0)); WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetJoin(x0));
@ -2880,7 +2880,7 @@ static Scheme_Object *os_wxPenSetCap(int n, Scheme_Object *p[])
x0 = WITH_VAR_STACK(unbundle_symset_cap(p[POFFSET+0], "set-cap in pen%")); x0 = WITH_VAR_STACK(unbundle_symset_cap(p[POFFSET+0], "set-cap in pen%"));
if (!((wxPen *)((Scheme_Class_Object *)THEOBJ)->primdata)->IsMutable()) WITH_VAR_STACK(scheme_signal_error("%s: this %s%% object is locked (in use by a dc<%%> object or in a list of %s constants)", METHODNAME("pen%","set-cap"), "pen", "pen"));
WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetCap(x0)); WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetCap(x0));
@ -2923,7 +2923,7 @@ static Scheme_Object *os_wxPenSetWidth(int n, Scheme_Object *p[])
x0 = WITH_VAR_STACK(objscheme_unbundle_double_in(p[POFFSET+0], 0, 255, "set-width in pen%")); x0 = WITH_VAR_STACK(objscheme_unbundle_double_in(p[POFFSET+0], 0, 255, "set-width in pen%"));
if (!((wxPen *)((Scheme_Class_Object *)THEOBJ)->primdata)->IsMutable()) WITH_VAR_STACK(scheme_signal_error("%s: this %s%% object is locked (in use by a dc<%%> object or in a list of %s constants)", METHODNAME("pen%","set-width"), "pen", "pen"));
WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetWidth(x0)); WITH_VAR_STACK(((wxPen *)((Scheme_Class_Object *)p[0])->primdata)->SetWidth(x0));

View File

@ -178,11 +178,11 @@
@CREATOR (string,rdouble[0|255],SYM[penStyle]); <> color name @CREATOR (string,rdouble[0|255],SYM[penStyle]); <> color name
@ "get-width" : double GetWidthF(); @ "get-width" : double GetWidthF();
@ "set-width" : void SetWidth(rdouble[0|255]); @ "set-width" : void SetWidth(rdouble[0|255]); : : /CHECKMUT[wxPen."pen".METHODNAME("pen%","set-width")]
@ "get-cap" : SYM[cap] GetCap(); @ "get-cap" : SYM[cap] GetCap();
@ "set-cap" : void SetCap(SYM[cap]); @ "set-cap" : void SetCap(SYM[cap]); : : /CHECKMUT[wxPen."pen".METHODNAME("pen%","set-cap")]
@ "get-join" : SYM[join] GetJoin(); @ "get-join" : SYM[join] GetJoin();
@ "set-join" : void SetJoin(SYM[join]); @ "set-join" : void SetJoin(SYM[join]); : : /CHECKMUT[wxPen."pen".METHODNAME("pen%","set-join")]
@ "get-color" : wxColour! GetColour(); @ "get-color" : wxColour! GetColour();
@ "set-color" : void SetColour(wxColour!); : : /CHECKMUT[wxPen."pen".METHODNAME("pen%","set-color")] <> color% @ "set-color" : void SetColour(wxColour!); : : /CHECKMUT[wxPen."pen".METHODNAME("pen%","set-color")] <> color%