[57438] users/toby/objcports

toby at macports.org toby at macports.org
Thu Sep 10 23:42:32 PDT 2009


Revision: 57438
          http://trac.macports.org/changeset/57438
Author:   toby at macports.org
Date:     2009-09-10 23:42:32 -0700 (Thu, 10 Sep 2009)
Log Message:
-----------
consolidate

Modified Paths:
--------------
    users/toby/objcports/MPIndex.c
    users/toby/objcports/MPPort.c
    users/toby/objcports/objcports.xcodeproj/project.pbxproj

Added Paths:
-----------
    users/toby/objcports/cftcl.c
    users/toby/objcports/cftcl.h

Removed Paths:
-------------
    users/toby/objcports/MPArrayAdditions.c
    users/toby/objcports/MPArrayAdditions.h
    users/toby/objcports/MPDictionaryAdditions.c
    users/toby/objcports/MPDictionaryAdditions.h
    users/toby/objcports/MPStringAdditions.c
    users/toby/objcports/MPStringAdditions.h

Deleted: users/toby/objcports/MPArrayAdditions.c
===================================================================
--- users/toby/objcports/MPArrayAdditions.c	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPArrayAdditions.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1,22 +0,0 @@
-#include <CoreFoundation/CoreFoundation.h>
-#include <tcl.h>
-
-#include "MPArrayAdditions.h"
-#include "MPStringAdditions.h"
-
-CFArrayRef
-CFArrayCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj * const *objects, CFIndex count)
-{
-	CFIndex i;
-	CFStringRef array[count];
-	CFArrayRef result;
-
-	for (i = 0; i < count; i++) {
-		array[i] = CFStringCreateWithTclObject(allocator, objects[i]);
-	}
-	result = CFArrayCreate(allocator, (const void **)array, count, &kCFTypeArrayCallBacks);
-	for (i = 0; i < count; i++) {
-		CFRelease(array[i]);
-	}
-	return result;
-}

Deleted: users/toby/objcports/MPArrayAdditions.h
===================================================================
--- users/toby/objcports/MPArrayAdditions.h	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPArrayAdditions.h	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1 +0,0 @@
-CFArrayRef CFArrayCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj * const *objects, CFIndex count);

Deleted: users/toby/objcports/MPDictionaryAdditions.c
===================================================================
--- users/toby/objcports/MPDictionaryAdditions.c	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPDictionaryAdditions.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1,31 +0,0 @@
-#include <CoreFoundation/CoreFoundation.h>
-#include <tcl.h>
-
-#include "MPDictionaryAdditions.h"
-#include "MPStringAdditions.h"
-
-CFDictionaryRef
-CFDictionaryCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj **objects, CFIndex count)
-{
-	CFIndex count2, i;
-	CFDictionaryRef result;
-
-	if ((count % 2) != 0) {
-		return nil;
-	}
-
-	count2 = count / 2;
-	
-	CFStringRef keys[count2];
-	CFStringRef values[count2];
-	for (i = 0; i < count2; i++) {
-		keys[i] = CFStringCreateWithTclObject(allocator, objects[i * 2]);
-		values[i] = CFStringCreateWithTclObject(allocator, objects[i * 2 + 1]);
-	}
-	result = CFDictionaryCreate(allocator, (const void **)keys, (const void **)values, count2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	for (i = 0; i < count2; i++) {
-		CFRelease(keys[i]);
-		CFRelease(values[i]);
-	}
-	return result;
-}

Deleted: users/toby/objcports/MPDictionaryAdditions.h
===================================================================
--- users/toby/objcports/MPDictionaryAdditions.h	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPDictionaryAdditions.h	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1 +0,0 @@
-CFDictionaryRef CFDictionaryCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj **objects, CFIndex count);

Modified: users/toby/objcports/MPIndex.c
===================================================================
--- users/toby/objcports/MPIndex.c	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPIndex.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -2,9 +2,7 @@
 #include <tcl.h>
 
 #include "MPIndex.h"
-#include "MPArrayAdditions.h"
-#include "MPDictionaryAdditions.h"
-#include "MPStringAdditions.h"
+#include "cftcl.h"
 #include "internal.h"
 
 CFDictionaryRef

Modified: users/toby/objcports/MPPort.c
===================================================================
--- users/toby/objcports/MPPort.c	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPPort.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -4,8 +4,7 @@
 #include <mach-o/getsect.h>
 
 #include "MPPort.h"
-#include "MPArrayAdditions.h"
-#include "MPStringAdditions.h"
+#include "cftcl.h"
 #include "internal.h"
 
 struct mp_port_s {

Deleted: users/toby/objcports/MPStringAdditions.c
===================================================================
--- users/toby/objcports/MPStringAdditions.c	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPStringAdditions.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1,10 +0,0 @@
-#include <CoreFoundation/CoreFoundation.h>
-#include <tcl.h>
-
-#include "MPStringAdditions.h"
-
-CFStringRef
-CFStringCreateWithTclObject(CFAllocatorRef allocator, Tcl_Obj *object)
-{
-	return CFStringCreateWithCString(allocator, Tcl_GetString(object), kCFStringEncodingUTF8);
-}

Deleted: users/toby/objcports/MPStringAdditions.h
===================================================================
--- users/toby/objcports/MPStringAdditions.h	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/MPStringAdditions.h	2009-09-11 06:42:32 UTC (rev 57438)
@@ -1 +0,0 @@
-CFStringRef CFStringCreateWithTclObject(CFAllocatorRef allocator, Tcl_Obj *object);

Added: users/toby/objcports/cftcl.c
===================================================================
--- users/toby/objcports/cftcl.c	                        (rev 0)
+++ users/toby/objcports/cftcl.c	2009-09-11 06:42:32 UTC (rev 57438)
@@ -0,0 +1,53 @@
+#include <CoreFoundation/CoreFoundation.h>
+#include <tcl.h>
+
+#include "cftcl.h"
+
+CFStringRef
+CFStringCreateWithTclObject(CFAllocatorRef allocator, Tcl_Obj *object)
+{
+	return CFStringCreateWithCString(allocator, Tcl_GetString(object), kCFStringEncodingUTF8);
+}
+
+CFArrayRef
+CFArrayCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj * const *objects, CFIndex count)
+{
+	CFIndex i;
+	CFStringRef array[count];
+	CFArrayRef result;
+	
+	for (i = 0; i < count; i++) {
+		array[i] = CFStringCreateWithTclObject(allocator, objects[i]);
+	}
+	result = CFArrayCreate(allocator, (const void **)array, count, &kCFTypeArrayCallBacks);
+	for (i = 0; i < count; i++) {
+		CFRelease(array[i]);
+	}
+	return result;
+}
+
+CFDictionaryRef
+CFDictionaryCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj **objects, CFIndex count)
+{
+	CFIndex count2, i;
+	CFDictionaryRef result;
+	
+	if ((count % 2) != 0) {
+		return nil;
+	}
+	
+	count2 = count / 2;
+	
+	CFStringRef keys[count2];
+	CFStringRef values[count2];
+	for (i = 0; i < count2; i++) {
+		keys[i] = CFStringCreateWithTclObject(allocator, objects[i * 2]);
+		values[i] = CFStringCreateWithTclObject(allocator, objects[i * 2 + 1]);
+	}
+	result = CFDictionaryCreate(allocator, (const void **)keys, (const void **)values, count2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+	for (i = 0; i < count2; i++) {
+		CFRelease(keys[i]);
+		CFRelease(values[i]);
+	}
+	return result;
+}

Added: users/toby/objcports/cftcl.h
===================================================================
--- users/toby/objcports/cftcl.h	                        (rev 0)
+++ users/toby/objcports/cftcl.h	2009-09-11 06:42:32 UTC (rev 57438)
@@ -0,0 +1,3 @@
+CFStringRef CFStringCreateWithTclObject(CFAllocatorRef allocator, Tcl_Obj *object);
+CFArrayRef CFArrayCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj * const *objects, CFIndex count);
+CFDictionaryRef CFDictionaryCreateWithTclObjects(CFAllocatorRef allocator, Tcl_Obj **objects, CFIndex count);

Modified: users/toby/objcports/objcports.xcodeproj/project.pbxproj
===================================================================
--- users/toby/objcports/objcports.xcodeproj/project.pbxproj	2009-09-11 06:37:39 UTC (rev 57437)
+++ users/toby/objcports/objcports.xcodeproj/project.pbxproj	2009-09-11 06:42:32 UTC (rev 57438)
@@ -9,13 +9,11 @@
 /* Begin PBXBuildFile section */
 		8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
 		DA13887B101AED7000F73A82 /* MPConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = DA13887A101AED7000F73A82 /* MPConfig.c */; };
+		DA382DE5105A284E00D9B600 /* cftcl.c in Sources */ = {isa = PBXBuildFile; fileRef = DA382DE4105A284E00D9B600 /* cftcl.c */; };
 		DA7AF1BC1058D1E200CF2187 /* internal.c in Sources */ = {isa = PBXBuildFile; fileRef = DA7AF1BB1058D1E200CF2187 /* internal.c */; };
 		DA96BED00F7C9C2500362779 /* MPIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = DA96BECF0F7C9C2500362779 /* MPIndex.c */; };
-		DA96BF4C0F7CA1A700362779 /* MPDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = DA96BF4B0F7CA1A700362779 /* MPDictionaryAdditions.c */; };
 		DAD371710F0280EF0064AFF4 /* port.c in Sources */ = {isa = PBXBuildFile; fileRef = DAD371680F0280EF0064AFF4 /* port.c */; };
-		DAD371720F0280EF0064AFF4 /* MPArrayAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = DAD3716A0F0280EF0064AFF4 /* MPArrayAdditions.c */; };
 		DAD371740F0280EF0064AFF4 /* MPPort.c in Sources */ = {isa = PBXBuildFile; fileRef = DAD3716E0F0280EF0064AFF4 /* MPPort.c */; };
-		DAD371750F0280EF0064AFF4 /* MPStringAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = DAD371700F0280EF0064AFF4 /* MPStringAdditions.c */; };
 		DAD371950F0281940064AFF4 /* libtcl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DAD371940F0281940064AFF4 /* libtcl.dylib */; };
 /* End PBXBuildFile section */
 
@@ -36,19 +34,15 @@
 		8DD76FA10486AA7600D96B5E /* port */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = port; sourceTree = BUILT_PRODUCTS_DIR; };
 		DA138879101AED7000F73A82 /* MPConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConfig.h; sourceTree = "<group>"; };
 		DA13887A101AED7000F73A82 /* MPConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPConfig.c; sourceTree = "<group>"; };
+		DA382DE3105A284E00D9B600 /* cftcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cftcl.h; sourceTree = "<group>"; };
+		DA382DE4105A284E00D9B600 /* cftcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cftcl.c; sourceTree = "<group>"; };
 		DA7AF1BA1058D1E200CF2187 /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = "<group>"; };
 		DA7AF1BB1058D1E200CF2187 /* internal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = internal.c; sourceTree = "<group>"; };
 		DA96BECE0F7C9C2500362779 /* MPIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIndex.h; sourceTree = "<group>"; };
 		DA96BECF0F7C9C2500362779 /* MPIndex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPIndex.c; sourceTree = "<group>"; };
-		DA96BF4A0F7CA1A700362779 /* MPDictionaryAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDictionaryAdditions.h; sourceTree = "<group>"; };
-		DA96BF4B0F7CA1A700362779 /* MPDictionaryAdditions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPDictionaryAdditions.c; sourceTree = "<group>"; };
 		DAD371680F0280EF0064AFF4 /* port.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = port.c; sourceTree = "<group>"; };
-		DAD371690F0280EF0064AFF4 /* MPArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPArrayAdditions.h; sourceTree = "<group>"; };
-		DAD3716A0F0280EF0064AFF4 /* MPArrayAdditions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPArrayAdditions.c; sourceTree = "<group>"; };
 		DAD3716D0F0280EF0064AFF4 /* MPPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPort.h; sourceTree = "<group>"; };
 		DAD3716E0F0280EF0064AFF4 /* MPPort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPPort.c; sourceTree = "<group>"; };
-		DAD3716F0F0280EF0064AFF4 /* MPStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStringAdditions.h; sourceTree = "<group>"; };
-		DAD371700F0280EF0064AFF4 /* MPStringAdditions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MPStringAdditions.c; sourceTree = "<group>"; };
 		DAD371940F0281940064AFF4 /* libtcl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtcl.dylib; path = /usr/lib/libtcl.dylib; sourceTree = "<absolute>"; };
 		FD1CD53B1018F5AD0071534F /* variables.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = variables.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -81,20 +75,16 @@
 			isa = PBXGroup;
 			children = (
 				DAD371680F0280EF0064AFF4 /* port.c */,
-				DAD371690F0280EF0064AFF4 /* MPArrayAdditions.h */,
-				DAD3716A0F0280EF0064AFF4 /* MPArrayAdditions.c */,
-				DA96BF4A0F7CA1A700362779 /* MPDictionaryAdditions.h */,
-				DA96BF4B0F7CA1A700362779 /* MPDictionaryAdditions.c */,
 				DA96BECE0F7C9C2500362779 /* MPIndex.h */,
 				DA96BECF0F7C9C2500362779 /* MPIndex.c */,
 				DAD3716D0F0280EF0064AFF4 /* MPPort.h */,
 				DAD3716E0F0280EF0064AFF4 /* MPPort.c */,
-				DAD3716F0F0280EF0064AFF4 /* MPStringAdditions.h */,
-				DAD371700F0280EF0064AFF4 /* MPStringAdditions.c */,
 				DA138879101AED7000F73A82 /* MPConfig.h */,
 				DA13887A101AED7000F73A82 /* MPConfig.c */,
 				DA7AF1BA1058D1E200CF2187 /* internal.h */,
 				DA7AF1BB1058D1E200CF2187 /* internal.c */,
+				DA382DE3105A284E00D9B600 /* cftcl.h */,
+				DA382DE4105A284E00D9B600 /* cftcl.c */,
 				FD1CD53B1018F5AD0071534F /* variables.plist */,
 			);
 			name = Source;
@@ -168,13 +158,11 @@
 			buildActionMask = 2147483647;
 			files = (
 				DAD371710F0280EF0064AFF4 /* port.c in Sources */,
-				DAD371720F0280EF0064AFF4 /* MPArrayAdditions.c in Sources */,
-				DAD371750F0280EF0064AFF4 /* MPStringAdditions.c in Sources */,
 				DA96BED00F7C9C2500362779 /* MPIndex.c in Sources */,
 				DAD371740F0280EF0064AFF4 /* MPPort.c in Sources */,
-				DA96BF4C0F7CA1A700362779 /* MPDictionaryAdditions.c in Sources */,
 				DA13887B101AED7000F73A82 /* MPConfig.c in Sources */,
 				DA7AF1BC1058D1E200CF2187 /* internal.c in Sources */,
+				DA382DE5105A284E00D9B600 /* cftcl.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090910/c2b18476/attachment.html>


More information about the macports-changes mailing list