diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-24 08:33:36 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-24 08:33:36 (GMT) |
commit | 0744c5ec615420dd92bb75eeda9246d0919786c1 (patch) | |
tree | 9e1dfba4bbd2afe24d34c1416d837895e35f818a /macosx/tkMacOSXBitmap.c | |
parent | 22a0b0ed3f7f0da75210a6d854fc4a7703b3c640 (diff) | |
download | tk-0744c5ec615420dd92bb75eeda9246d0919786c1.zip tk-0744c5ec615420dd92bb75eeda9246d0919786c1.tar.gz tk-0744c5ec615420dd92bb75eeda9246d0919786c1.tar.bz2 |
Ttk and Aqua done
Diffstat (limited to 'macosx/tkMacOSXBitmap.c')
-rw-r--r-- | macosx/tkMacOSXBitmap.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c index 0c94712..2610e3a 100644 --- a/macosx/tkMacOSXBitmap.c +++ b/macosx/tkMacOSXBitmap.c @@ -394,7 +394,8 @@ TkMacOSXIconBitmapObjCmd( } name = Tcl_GetStringFromObj(objv[i++], &len); if (!len) { - Tcl_AppendResult(interp, "empty bitmap name", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj("empty bitmap name", -1)); + Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "BAD", NULL); goto end; } if (Tcl_GetIntFromObj(interp, objv[i++], &ib.width) != TCL_OK) { @@ -409,19 +410,23 @@ TkMacOSXIconBitmapObjCmd( } value = Tcl_GetStringFromObj(objv[i++], &len); if (!len) { - Tcl_AppendResult(interp, "empty bitmap value", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj("empty bitmap value", -1)); + Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "EMPTY", NULL); goto end; } #if 0 if ((kind == ICON_TYPE || kind == ICON_SYSTEM)) { Tcl_DString ds; Tcl_Encoding encoding = Tcl_GetEncoding(NULL, "macRoman"); + Tcl_UtfToExternalDString(encoding, value, -1, &ds); len = Tcl_DStringLength(&ds); Tcl_DStringFree(&ds); Tcl_FreeEncoding(encoding); if (len > 4) { - Tcl_AppendResult(interp, "invalid bitmap value", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "invalid bitmap value", -1)); + Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "INVALID", NULL); goto end; } } @@ -441,7 +446,7 @@ TkMacOSXIconBitmapObjCmd( } *iconBitmap = ib; result = TCL_OK; -end: + end: return result; } |