[43365] trunk/base
toby at macports.org
toby at macports.org
Tue Dec 9 17:20:01 PST 2008
Revision: 43365
http://trac.macports.org/changeset/43365
Author: toby at macports.org
Date: 2008-12-09 17:20:01 -0800 (Tue, 09 Dec 2008)
Log Message:
-----------
Angrier warnings for objc bits, although I'm not sure this code is even used.
Modified Paths:
--------------
trunk/base/Mk/macports.autoconf.mk.in
trunk/base/src/tclobjc1.0/tclobjc.m
trunk/base/src/tclobjc1.0/tclobjc_types.m
Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in 2008-12-09 23:51:42 UTC (rev 43364)
+++ trunk/base/Mk/macports.autoconf.mk.in 2008-12-10 01:20:01 UTC (rev 43365)
@@ -8,7 +8,7 @@
CC = @CC@
CFLAGS = @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR) $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) $(CPPFLAGS)
-OBJCFLAGS = @OBJCFLAGS@ $(CFLAGS_WERROR) ${CFLAGS_DEBUG} $(CFLAGS_OPTIMIZE) $(CPPFLAGS)
+OBJCFLAGS = @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR) ${CFLAGS_DEBUG} $(CFLAGS_OPTIMIZE) $(CPPFLAGS)
CPPFLAGS = @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
TCL_DEFS = @TCL_DEFS@ -UPACKAGE_NAME -UPACKAGE_TARNAME -UPACKAGE_VERSION -UPACKAGE_STRING -UPACKAGE_BUGREPORT
SHLIB_CFLAGS = @SHLIB_CFLAGS@
Modified: trunk/base/src/tclobjc1.0/tclobjc.m
===================================================================
--- trunk/base/src/tclobjc1.0/tclobjc.m 2008-12-09 23:51:42 UTC (rev 43364)
+++ trunk/base/src/tclobjc1.0/tclobjc.m 2008-12-10 01:20:01 UTC (rev 43365)
@@ -57,6 +57,9 @@
SEL selector;
Tcl_Obj *selname;
int i = 1;
+ NSMethodSignature *signature;
+ NSInvocation *invocation;
+
fprintf(stderr, "objc = %d\n", objc);
if (objc < 2) {
@@ -87,9 +90,9 @@
goto cleanup;
}
-// fprintf(stderr, "target = %08x\n", target);
- NSMethodSignature* signature = [target methodSignatureForSelector:selector];
- NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature];
+ /*fprintf(stderr, "target = %08x\n", target);*/
+ signature = [target methodSignatureForSelector:selector];
+ invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:target];
[invocation setSelector:selector];
@@ -118,7 +121,6 @@
Tcl_SetObjResult(interp, tcl_result);
result = TCL_ERROR;
} else {
- unsigned int word = value;
[invocation setArgument:&value atIndex:arg_num];
}
}
@@ -139,12 +141,14 @@
/* If all is well, invoke the Objective-C method. */
if (result == TCL_OK) {
Tcl_Obj *tcl_result;
+ void *result_ptr;
+ const char *result_type;
+
[invocation invoke];
fprintf(stderr, "result size = %lu\n", (unsigned long)[signature methodReturnLength]);
- void* result_ptr;
[invocation getReturnValue:&result_ptr];
- const char* result_type = tclobjc_getreturn_typestring(signature);
+ result_type = tclobjc_getreturn_typestring(signature);
result = objc_to_tclobj(interp, &tcl_result, result_type, result_ptr);
Tcl_SetObjResult(interp, tcl_result);
}
@@ -158,7 +162,7 @@
/*
* Invoke the standard 'unknown' procedure
*/
-static int StandardUnknownObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+static int StandardUnknownObjCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
Tcl_CmdInfo info;
int result;
if (!Tcl_GetCommandInfo(interp, "tclobjc::standard_unknown", &info) || !info.isNativeObjectProc)
@@ -180,7 +184,7 @@
* Dispatches messages to Objective C classes, if one exists, or calls
* standard 'unknown' procedure
*/
-static int UnknownObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+static int UnknownObjCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
const char *className;
id classId;
Tcl_Obj **sobjv;
Modified: trunk/base/src/tclobjc1.0/tclobjc_types.m
===================================================================
--- trunk/base/src/tclobjc1.0/tclobjc_types.m 2008-12-09 23:51:42 UTC (rev 43364)
+++ trunk/base/src/tclobjc1.0/tclobjc_types.m 2008-12-10 01:20:01 UTC (rev 43365)
@@ -81,8 +81,8 @@
/**
* Release the internal objective-c instance.
*/
-static void free_objc_internalrep(Tcl_Obj *objPtr) {
- // TODO cleanup
+static void free_objc_internalrep(Tcl_Obj *objPtr UNUSED) {
+ /* TODO cleanup */
}
/**
@@ -128,7 +128,7 @@
string = Tcl_GetStringFromObj(objPtr, &length);
/* Verify that this is a valid string */
- if ((length < sizeof(tclobjc_name_prefix)) ||
+ if ((length < (int)sizeof(tclobjc_name_prefix)) ||
(strncmp(string, tclobjc_name_prefix,
sizeof(tclobjc_name_prefix)) != 0)) {
goto invalid_obj;
@@ -136,7 +136,7 @@
p = string + sizeof(tclobjc_name_prefix);
- if (sscanf(p, "%p", &objcId) != 1)
+ if (sscanf(p, "%p", (void **)&objcId) != 1)
goto invalid_obj;
/* Free the old internal representation before setting new one */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081209/055ab415/attachment-0001.html>
More information about the macports-changes
mailing list