[40055] trunk/base/src/tclobjc1.0/tclobjc.m
toby at macports.org
toby at macports.org
Thu Sep 18 19:33:48 PDT 2008
Revision: 40055
http://trac.macports.org/changeset/40055
Author: toby at macports.org
Date: 2008-09-18 19:33:48 -0700 (Thu, 18 Sep 2008)
Log Message:
-----------
Prefer -UTF8String over long-deprecated -cString.
Eliminate a format string issue.
Modified Paths:
--------------
trunk/base/src/tclobjc1.0/tclobjc.m
Modified: trunk/base/src/tclobjc1.0/tclobjc.m
===================================================================
--- trunk/base/src/tclobjc1.0/tclobjc.m 2008-09-19 02:22:41 UTC (rev 40054)
+++ trunk/base/src/tclobjc1.0/tclobjc.m 2008-09-19 02:33:48 UTC (rev 40055)
@@ -114,7 +114,7 @@
if (Tcl_GetLongFromObj(interp, objv[i], &value) == TCL_OK) {
if (value > UINT_MAX || value < 0) {
NSString *str = [NSString stringWithFormat:@"Unsigned integer argument invalid: %ld", value];
- Tcl_Obj *tcl_result = Tcl_NewStringObj([str cString], -1);
+ Tcl_Obj *tcl_result = Tcl_NewStringObj([str UTF8String], -1);
Tcl_SetObjResult(interp, tcl_result);
result = TCL_ERROR;
} else {
@@ -129,7 +129,7 @@
[invocation setArgument:&buf atIndex:arg_num];
} else {
NSString* str = [NSString stringWithFormat:@"unexpected argument type %s at %s:%d", arg_type, __FILE__, __LINE__];
- Tcl_Obj* tcl_result = Tcl_NewStringObj([str cString], -1);
+ Tcl_Obj* tcl_result = Tcl_NewStringObj([str UTF8String], -1);
Tcl_SetObjResult(interp, tcl_result);
result = TCL_ERROR;
break;
@@ -140,7 +140,7 @@
if (result == TCL_OK) {
Tcl_Obj *tcl_result;
[invocation invoke];
- fprintf(stderr, "result size = %d\n", [signature methodReturnLength]);
+ fprintf(stderr, "result size = %lu\n", (unsigned long)[signature methodReturnLength]);
void* result_ptr;
[invocation getReturnValue:&result_ptr];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080918/b58dc333/attachment.html
More information about the macports-changes
mailing list