Commits

Anonymous committed a4594d6

Removed lpeg as a direct dependency and made it a loadable module that is inside the PlugIns part of the framework. Also disabled LNUM_COMPLEX in Lua build.

Since lpeg is not actually used (yet) since I never finished the Objective-Lua, I am refactoring it out to make it easier for projects that need to work with lpeg that is LuaCocoa agnostic.

Added a new Xcode project for lpeg.

Fixed up some // comments in luaconf.h.

I decided to remove the LNUM_COMPLEX because I don't know the future of LNUM with regards to looking towards Lua 5.2.

  • Participants
  • Parent commits 6c5a66c

Comments (0)

Files changed (5)

File LuaCocoa/LuaCocoa.m

 #import "LuaClassDefinitionMap.h"
 #import "LuaCocoaAvailableLuaStates.h"
 
+/*
 // No lpeg.h, so I forward declare it here so I can use it.
 extern int luaopen_lpeg (lua_State *L);
+*/
 
 //NSString* const kLuaCocoaErrorDomain = @"kLuaCocoaErrorDomain";
 
 	
 
 
-	
+/*	
 	// Open LPeg (which we need for Objective Lua)
 	lua_pushcfunction(luaState, luaopen_lpeg);
 	lua_pushstring(luaState, "lpeg");
 	lua_call(luaState, 1, 0);
-	
+*/	
 	
 	// Create global weak table for objects
 	// Must do this before opening the LuaCocoa related libraries

File Xcode/LuaCocoa.xcodeproj/project.pbxproj

 		0000101A10B0D8FD00D70D52 /* LuaCocoaStrongTable.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000101810B0D8FD00D70D52 /* LuaCocoaStrongTable.m */; };
 		001B4CB014F08FF2001CD36E /* LuaBlockBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 001B4CAE14F08FF2001CD36E /* LuaBlockBridge.h */; };
 		001B4CB114F08FF2001CD36E /* LuaBlockBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 001B4CAF14F08FF2001CD36E /* LuaBlockBridge.m */; };
+		002FB3AF1566FBD400CC1A47 /* lpeg.so in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 00D5A64C1566FA6600718681 /* lpeg.so */; };
 		0050AF8510821D4500DFBEC6 /* BridgeSupportController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0050AF7F10821D4500DFBEC6 /* BridgeSupportController.h */; };
 		0050AF8610821D4500DFBEC6 /* BridgeSupportController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0050AF8010821D4500DFBEC6 /* BridgeSupportController.m */; };
 		0050AF8710821D4500DFBEC6 /* LuaCUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 0050AF8110821D4500DFBEC6 /* LuaCUtils.c */; };
 		0071AD00127EC49A003EE1C0 /* luaconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 0071ACFF127EC49A003EE1C0 /* luaconf.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		00760495109E93940079B079 /* LuaCocoa.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* LuaCocoa.framework */; };
 		007607A2109EA3A20079B079 /* liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 007606AD109E9D460079B079 /* liblua.a */; };
-		0076ED9E108BE4BD0079B079 /* lpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 0076ED97108BE4BD0079B079 /* lpeg.c */; };
 		0076EDA5108BE4EE0079B079 /* re.lua in Resources */ = {isa = PBXBuildFile; fileRef = 0076ED9B108BE4BD0079B079 /* re.lua */; };
 		0076EDD7108BE5350079B079 /* grammar.lua in Copy leg */ = {isa = PBXBuildFile; fileRef = 0076EDB9108BE50B0079B079 /* grammar.lua */; };
 		0076EDD8108BE5350079B079 /* init.lua in Copy leg */ = {isa = PBXBuildFile; fileRef = 0076EDBA108BE50B0079B079 /* init.lua */; };
 			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
 			remoteInfo = LuaCocoa;
 		};
+		00D5A64B1566FA6600718681 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 00D5A6461566FA6500718681 /* lpeg.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 00D5A6311566F6DF00718681;
+			remoteInfo = lpeg;
+		};
+		00D5A64D1566FA6600718681 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 00D5A6461566FA6500718681 /* lpeg.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 00D5A5D11566DF6200718681;
+			remoteInfo = liblpeg;
+		};
+		00D5A6661566FB5A00718681 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 00D5A6461566FA6500718681 /* lpeg.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 00D5A6301566F6DF00718681;
+			remoteInfo = lpeg;
+		};
 		00DDA03C1299E74500036662 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
 			name = "Copy leg";
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		00D5A6681566FB6F00718681 /* Copy PlugIns */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 13;
+			files = (
+				002FB3AF1566FBD400CC1A47 /* lpeg.so in Copy PlugIns */,
+			);
+			name = "Copy PlugIns";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
 		00D4A50F14ECA4C5009E57C5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		00D4A51214ECA4C6009E57C5 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
 		00D4A51D14ECA8B9009E57C5 /* OpenSavePanelDelegate.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = OpenSavePanelDelegate.lua; sourceTree = "<group>"; };
+		00D5A6461566FA6500718681 /* lpeg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lpeg.xcodeproj; sourceTree = "<group>"; };
 		00DDA2C9129A1F4500036662 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.txt; path = ../LICENSE.txt; sourceTree = SOURCE_ROOT; };
 		00DDA2CA129A1F4500036662 /* README.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = README.rtf; path = ../README.rtf; sourceTree = SOURCE_ROOT; };
 		00DF0B9A12605A56007AED88 /* SimpleLuaOpenGLView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleLuaOpenGLView.app; sourceTree = BUILT_PRODUCTS_DIR; };
 			name = "Supporting Files";
 			sourceTree = "<group>";
 		};
+		00D5A6471566FA6500718681 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				00D5A64C1566FA6600718681 /* lpeg.so */,
+				00D5A64E1566FA6600718681 /* liblpeg.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
 		00DF0B9F12605A8B007AED88 /* SimpleLuaOpenGLView */ = {
 			isa = PBXGroup;
 			children = (
 			children = (
 				0051AE3D1256AAF00047D73E /* Lua Public Headers */,
 				00760613109E9A800079B079 /* lua.xcodeproj */,
+				00D5A6461566FA6500718681 /* lpeg.xcodeproj */,
 				1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
 				1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
 			);
 				8DC2EF540486A6940098B216 /* Sources */,
 				8DC2EF560486A6940098B216 /* Frameworks */,
 				007604A5109E949E0079B079 /* Copy Frameworks */,
+				00D5A6681566FB6F00718681 /* Copy PlugIns */,
+				002FB43A156721B600CC1A47 /* Workaround Broken Xcode Copy PlugIns */,
 				8DC2EF520486A6940098B216 /* Resources */,
 				0051AE521256AF0D0047D73E /* Copy Utility Executables */,
 				0097AFFE10C76A2400DABE6A /* Copy leg */,
 			);
 			dependencies = (
 				0076099D109EFCCC0079B079 /* PBXTargetDependency */,
+				00D5A6671566FB5A00718681 /* PBXTargetDependency */,
 				0051AE4E1256AEAF0047D73E /* PBXTargetDependency */,
 				0051AE501256AEAF0047D73E /* PBXTargetDependency */,
 			);
 			projectDirPath = "";
 			projectReferences = (
 				{
+					ProductGroup = 00D5A6471566FA6500718681 /* Products */;
+					ProjectRef = 00D5A6461566FA6500718681 /* lpeg.xcodeproj */;
+				},
+				{
 					ProductGroup = 007606A4109E9D460079B079 /* Products */;
 					ProjectRef = 00760613109E9A800079B079 /* lua.xcodeproj */;
 				},
 			remoteRef = 007606B0109E9D460079B079 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
+		00D5A64C1566FA6600718681 /* lpeg.so */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.dylib";
+			path = lpeg.so;
+			remoteRef = 00D5A64B1566FA6600718681 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		00D5A64E1566FA6600718681 /* liblpeg.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = liblpeg.a;
+			remoteRef = 00D5A64D1566FA6600718681 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+		002FB43A156721B600CC1A47 /* Workaround Broken Xcode Copy PlugIns */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Workaround Broken Xcode Copy PlugIns";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# Xcode 4.3.2 is incorrectly copying PlugIns to the Resource directory.\n# The variable $PLUGINS_FOLDER_PATH is wrong too and points to Resources: LuaCocoa.framework/Versions/A/Resources\necho \"BUILT_PRODUCTS_DIR $BUILT_PRODUCTS_DIR\"\necho \"CONTENTS_FOLDER_PATH  $CONTENTS_FOLDER_PATH\"\necho \"PLUGINS_FOLDER_PATH  $PLUGINS_FOLDER_PATH\"\necho \"WRAPPER_NAME  $WRAPPER_NAME\"\n# override the wrong value with the correct value\nPLUGINS_FOLDER_PATH=\"$CONTENTS_FOLDER_PATH/PlugIns\"\nmkdir -p \"$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH\"\nmv \"$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/lpeg.so\" \"$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH\"\n# Need to create the symlink too\nln -sf \"$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH\" \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME/PlugIns\"\n";
+		};
 		00C0BF4214B9082B00AA4495 /* Rewrite libreadline dependency for backwards compatibility */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 				0050B37610863E9D00DFBEC6 /* StructSupport.m in Sources */,
 				0050B3B71086942700DFBEC6 /* ParseSupport.m in Sources */,
 				0050B3C21086A2AF00DFBEC6 /* ParseSupportStruct.m in Sources */,
-				0076ED9E108BE4BD0079B079 /* lpeg.c in Sources */,
 				0076F50A10913B000079B079 /* ObjectSupport.m in Sources */,
 				0076F50C10913B010079B079 /* LuaObjectBridge.m in Sources */,
 				0076F6F71093C1E70079B079 /* ParseSupportFunction.m in Sources */,
 			target = 8DC2EF4F0486A6940098B216 /* LuaCocoa */;
 			targetProxy = 00D4A51A14ECA579009E57C5 /* PBXContainerItemProxy */;
 		};
+		00D5A6671566FB5A00718681 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = lpeg;
+			targetProxy = 00D5A6661566FB5A00718681 /* PBXContainerItemProxy */;
+		};
 		00DDA03D1299E74500036662 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = 0051AEE21256B6580047D73E /* Build LuaCocoa and Utilities */;

File Xcode/lpeg.xcodeproj/project.pbxproj

+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		00D5A5EA1566E02800718681 /* lpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D5A5E31566E02800718681 /* lpeg.c */; };
+		00D5A5EB1566E02800718681 /* lpeg.h in Headers */ = {isa = PBXBuildFile; fileRef = 00D5A5E41566E02800718681 /* lpeg.h */; };
+		00D5A6351566F73900718681 /* lpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D5A5E31566E02800718681 /* lpeg.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		00D5A5D11566DF6200718681 /* liblpeg.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblpeg.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		00D5A5E11566E02800718681 /* HISTORY */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HISTORY; sourceTree = "<group>"; };
+		00D5A5E21566E02800718681 /* lpeg-128.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "lpeg-128.gif"; sourceTree = "<group>"; };
+		00D5A5E31566E02800718681 /* lpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lpeg.c; sourceTree = "<group>"; };
+		00D5A5E41566E02800718681 /* lpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lpeg.h; sourceTree = "<group>"; };
+		00D5A5E51566E02800718681 /* lpeg.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = lpeg.html; sourceTree = "<group>"; };
+		00D5A5E61566E02800718681 /* makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = "<group>"; };
+		00D5A5E71566E02800718681 /* re.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = re.html; sourceTree = "<group>"; };
+		00D5A5E81566E02800718681 /* re.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = re.lua; sourceTree = "<group>"; };
+		00D5A5E91566E02800718681 /* test.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = test.lua; sourceTree = "<group>"; };
+		00D5A6311566F6DF00718681 /* lpeg.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = lpeg.so; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		00D5A5CE1566DF6200718681 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		00D5A62E1566F6DF00718681 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		00D5A5C61566DF6200718681 = {
+			isa = PBXGroup;
+			children = (
+				00D5A5E01566E02800718681 /* lpeg */,
+				00D5A5D21566DF6200718681 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		00D5A5D21566DF6200718681 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				00D5A5D11566DF6200718681 /* liblpeg.a */,
+				00D5A6311566F6DF00718681 /* lpeg.so */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		00D5A5E01566E02800718681 /* lpeg */ = {
+			isa = PBXGroup;
+			children = (
+				00D5A5E11566E02800718681 /* HISTORY */,
+				00D5A5E21566E02800718681 /* lpeg-128.gif */,
+				00D5A5E31566E02800718681 /* lpeg.c */,
+				00D5A5E41566E02800718681 /* lpeg.h */,
+				00D5A5E51566E02800718681 /* lpeg.html */,
+				00D5A5E61566E02800718681 /* makefile */,
+				00D5A5E71566E02800718681 /* re.html */,
+				00D5A5E81566E02800718681 /* re.lua */,
+				00D5A5E91566E02800718681 /* test.lua */,
+			);
+			name = lpeg;
+			path = ../lpeg;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		00D5A5CF1566DF6200718681 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				00D5A5EB1566E02800718681 /* lpeg.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		00D5A62F1566F6DF00718681 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		00D5A5D01566DF6200718681 /* liblpeg */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 00D5A5D51566DF6200718681 /* Build configuration list for PBXNativeTarget "liblpeg" */;
+			buildPhases = (
+				00D5A5CD1566DF6200718681 /* Sources */,
+				00D5A5CE1566DF6200718681 /* Frameworks */,
+				00D5A5CF1566DF6200718681 /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = liblpeg;
+			productName = lpeg;
+			productReference = 00D5A5D11566DF6200718681 /* liblpeg.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		00D5A6301566F6DF00718681 /* lpeg */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 00D5A6321566F6E000718681 /* Build configuration list for PBXNativeTarget "lpeg" */;
+			buildPhases = (
+				00D5A62D1566F6DF00718681 /* Sources */,
+				00D5A62E1566F6DF00718681 /* Frameworks */,
+				00D5A62F1566F6DF00718681 /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = lpeg;
+			productName = lpeg;
+			productReference = 00D5A6311566F6DF00718681 /* lpeg.so */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		00D5A5C81566DF6200718681 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0430;
+			};
+			buildConfigurationList = 00D5A5CB1566DF6200718681 /* Build configuration list for PBXProject "lpeg" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = 00D5A5C61566DF6200718681;
+			productRefGroup = 00D5A5D21566DF6200718681 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				00D5A6301566F6DF00718681 /* lpeg */,
+				00D5A5D01566DF6200718681 /* liblpeg */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		00D5A5CD1566DF6200718681 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				00D5A5EA1566E02800718681 /* lpeg.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		00D5A62D1566F6DF00718681 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				00D5A6351566F73900718681 /* lpeg.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		00D5A5D31566DF6200718681 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				COPY_PHASE_STRIP = NO;
+				GCC_CW_ASM_SYNTAX = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_ENABLE_OBJC_GC = supported;
+				GCC_ENABLE_PASCAL_STRINGS = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(SRCROOT)/../lua/src";
+				MACOSX_DEPLOYMENT_TARGET = 10.5;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		00D5A5D41566DF6200718681 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_CW_ASM_SYNTAX = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_ENABLE_OBJC_GC = supported;
+				GCC_ENABLE_PASCAL_STRINGS = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(SRCROOT)/../lua/src";
+				MACOSX_DEPLOYMENT_TARGET = 10.5;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		00D5A5D61566DF6200718681 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DYLIB_CURRENT_VERSION = /usr/local/lib;
+				EXECUTABLE_PREFIX = "";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		00D5A5D71566DF6200718681 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DYLIB_CURRENT_VERSION = /usr/local/lib;
+				EXECUTABLE_PREFIX = "";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+		00D5A6331566F6E000718681 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DYLIB_COMPATIBILITY_VERSION = "";
+				DYLIB_CURRENT_VERSION = "";
+				EXECUTABLE_EXTENSION = so;
+				MACH_O_TYPE = mh_bundle;
+				OTHER_LDFLAGS = (
+					"-undefined",
+					dynamic_lookup,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		00D5A6341566F6E000718681 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DYLIB_COMPATIBILITY_VERSION = "";
+				DYLIB_CURRENT_VERSION = "";
+				EXECUTABLE_EXTENSION = so;
+				MACH_O_TYPE = mh_bundle;
+				OTHER_LDFLAGS = (
+					"-undefined",
+					dynamic_lookup,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		00D5A5CB1566DF6200718681 /* Build configuration list for PBXProject "lpeg" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				00D5A5D31566DF6200718681 /* Debug */,
+				00D5A5D41566DF6200718681 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		00D5A5D51566DF6200718681 /* Build configuration list for PBXNativeTarget "liblpeg" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				00D5A5D61566DF6200718681 /* Debug */,
+				00D5A5D71566DF6200718681 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		00D5A6321566F6E000718681 /* Build configuration list for PBXNativeTarget "lpeg" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				00D5A6331566F6E000718681 /* Debug */,
+				00D5A6341566F6E000718681 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 00D5A5C81566DF6200718681 /* Project object */;
+}

File lua/Xcode/lua.xcodeproj/project.pbxproj

 		007605B0109E98B50079B079 /* lapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760540109E98B50079B079 /* lapi.c */; };
 		007605B1109E98B50079B079 /* lapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 00760541109E98B50079B079 /* lapi.h */; };
 		007605B2109E98B50079B079 /* lauxlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760542109E98B50079B079 /* lauxlib.c */; };
-		007605B3109E98B50079B079 /* lauxlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 00760543109E98B50079B079 /* lauxlib.h */; };
+		007605B3109E98B50079B079 /* lauxlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 00760543109E98B50079B079 /* lauxlib.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		007605B4109E98B50079B079 /* lbaselib.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760544109E98B50079B079 /* lbaselib.c */; };
 		007605B5109E98B50079B079 /* lcode.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760545109E98B50079B079 /* lcode.c */; };
 		007605B6109E98B50079B079 /* lcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 00760546109E98B50079B079 /* lcode.h */; };
 		007605D8109E98B50079B079 /* ltablib.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760568109E98B50079B079 /* ltablib.c */; };
 		007605D9109E98B50079B079 /* ltm.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760569109E98B50079B079 /* ltm.c */; };
 		007605DA109E98B50079B079 /* ltm.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056A109E98B50079B079 /* ltm.h */; };
-		007605DC109E98B50079B079 /* lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056C109E98B50079B079 /* lua.h */; };
-		007605DE109E98B50079B079 /* luaconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056E109E98B50079B079 /* luaconf.h */; };
-		007605DF109E98B50079B079 /* lualib.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056F109E98B50079B079 /* lualib.h */; };
+		007605DC109E98B50079B079 /* lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056C109E98B50079B079 /* lua.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		007605DE109E98B50079B079 /* luaconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056E109E98B50079B079 /* luaconf.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		007605DF109E98B50079B079 /* lualib.h in Headers */ = {isa = PBXBuildFile; fileRef = 0076056F109E98B50079B079 /* lualib.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		007605E0109E98B50079B079 /* lundump.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760570109E98B50079B079 /* lundump.c */; };
 		007605E1109E98B50079B079 /* lundump.h in Headers */ = {isa = PBXBuildFile; fileRef = 00760571109E98B50079B079 /* lundump.h */; };
 		007605E2109E98B50079B079 /* lvm.c in Sources */ = {isa = PBXBuildFile; fileRef = 00760572109E98B50079B079 /* lvm.c */; };
 		007609AE109EFD150079B079 /* lnum.h in Headers */ = {isa = PBXBuildFile; fileRef = 007609A8109EFD150079B079 /* lnum.h */; };
 		007609AF109EFD150079B079 /* luaconf_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 007609A9109EFD150079B079 /* luaconf_internal.h */; };
 		00C0BF4E14B90B3600AA4495 /* libreadline.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C0BF4D14B90B3600AA4495 /* libreadline.dylib */; };
+		00D5A5FC1566EB2E00718681 /* lua.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 0076067F109E9CB10079B079 /* lua.hpp */; settings = {ATTRIBUTES = (Public, ); }; };
 		00FFB777152FB142001D5B64 /* lobjectivec_exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00FFB775152FB142001D5B64 /* lobjectivec_exceptions.h */; };
 		00FFB778152FB142001D5B64 /* lobjectivec_exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 00FFB775152FB142001D5B64 /* lobjectivec_exceptions.h */; };
 		00FFB779152FB142001D5B64 /* lobjectivec_exceptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 00FFB776152FB142001D5B64 /* lobjectivec_exceptions.m */; };
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				007605DE109E98B50079B079 /* luaconf.h in Headers */,
+				007605DC109E98B50079B079 /* lua.h in Headers */,
+				007605DF109E98B50079B079 /* lualib.h in Headers */,
+				007605B3109E98B50079B079 /* lauxlib.h in Headers */,
+				00D5A5FC1566EB2E00718681 /* lua.hpp in Headers */,
 				007605B1109E98B50079B079 /* lapi.h in Headers */,
-				007605B3109E98B50079B079 /* lauxlib.h in Headers */,
 				007605B6109E98B50079B079 /* lcode.h in Headers */,
 				007605B9109E98B50079B079 /* ldebug.h in Headers */,
 				007605BB109E98B50079B079 /* ldo.h in Headers */,
 				007605D4109E98B50079B079 /* lstring.h in Headers */,
 				007605D7109E98B50079B079 /* ltable.h in Headers */,
 				007605DA109E98B50079B079 /* ltm.h in Headers */,
-				007605DC109E98B50079B079 /* lua.h in Headers */,
-				007605DE109E98B50079B079 /* luaconf.h in Headers */,
-				007605DF109E98B50079B079 /* lualib.h in Headers */,
 				007605E1109E98B50079B079 /* lundump.h in Headers */,
 				007605E3109E98B50079B079 /* lvm.h in Headers */,
 				007605E5109E98B50079B079 /* lzio.h in Headers */,

File lua/src/luaconf.h

 #if __LP64__
 	#define LNUM_DOUBLE
 	#define LNUM_INT64
-#else // implicitly 32-bit Mac
+#else /* implicitly 32-bit Mac
 	// TODO: Add case for iPhone
 	// Should we try float for 32-bit since we now have an int type?
 	// There are enough double APIs in Cocoa that keeping double might be best
+	*/
 	#define LNUM_DOUBLE
 	#define LNUM_INT32
 #endif
 
-// Seems cool. Why not? We're already using C99 in the Bridge.
-#define LNUM_COMPLEX
+/* Seems cool. Why not? We're already using C99 in the Bridge. */
+/* #define LNUM_COMPLEX */
 
 /*
 ** LUA_NUMBER is the type of floating point number in Lua