apply review comments wip
authorRichard Taylor <richard.i.taylor@nokia.com>
Tue, 04 May 2010 12:08:55 +0100
branchwip
changeset 507 54a88b895bcd
parent 506 efe4a967495a
child 508 8ac72bc37dd6
apply review comments
sbsv2/raptor/lib/config/winscw.xml
sbsv2/raptor/python/raptor_api.py
sbsv2/raptor/test/unit_suite/raptor_api_unit.py
--- a/sbsv2/raptor/lib/config/winscw.xml	Fri Apr 30 16:52:27 2010 +0100
+++ b/sbsv2/raptor/lib/config/winscw.xml	Tue May 04 12:08:55 2010 +0100
@@ -127,7 +127,7 @@
 		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
 	</var>
 
-	<var name="win_udeb">
+	<var name="winscw_debug">
 		<set name="FULLVARIANTPATH" value="winscw/udeb"/>
 		<set name="VARIANTTYPE" value="udeb"/>
 
@@ -135,16 +135,16 @@
 		<append name="CFLAGS" value="-g -O0 -inline off"/>
 		<append name="LFLAGS" value="-g"/>
 	</var>
-	<alias name="winscw_udeb" meaning="winscw_base.win_udeb"/>
+	<alias name="winscw_udeb" meaning="winscw_base.winscw_debug"/>
 	
-	<var name="win_urel">
+	<var name="winscw_release">
 		<set name="FULLVARIANTPATH" value="winscw/urel"/>
 		<set name="VARIANTTYPE" value="urel"/>
 
 		<append name="CDEFS" value="NDEBUG"/>
 		<append name="CFLAGS" value="-O4,s"/>
 	</var>
-	<alias name="winscw_urel" meaning="winscw_base.win_urel"/>
+	<alias name="winscw_urel" meaning="winscw_base.winscw_release"/>
 	
 	<group name="winscw">
 		<aliasRef ref="winscw_urel"/>
--- a/sbsv2/raptor/python/raptor_api.py	Fri Apr 30 16:52:27 2010 +0100
+++ b/sbsv2/raptor/python/raptor_api.py	Tue May 04 12:08:55 2010 +0100
@@ -19,6 +19,11 @@
 # module only, as it is the only programatic interface considered public. The
 # command line --query option is also implemented using this module.
 
+# constants
+ALL = 1
+
+# objects
+
 class Reply(object):
 	"""object to return values from API calls.
 	"""
@@ -103,7 +108,7 @@
 		
 		This is a convenience method for "lazy" callers.
 		
-		The return value is also converted into a string.
+		The return value is also converted into a well-formed XML string.
 		"""
 		
 		if query == "aliases":
@@ -128,12 +133,12 @@
 		"""extract all aliases of a given type.
 		
 		the default type is "".
-		to get all aliases pass type=None
+		to get all aliases pass type=ALL
 		"""
 		aliases = []
 		
 		for a in self.__raptor.cache.aliases.values():
-			if a.type == type or type == None:
+			if type == ALL or a.type == type:
 				# copy the members we want to expose
 				aliases.append( Alias(a.name, a.meaning) )
 			
--- a/sbsv2/raptor/test/unit_suite/raptor_api_unit.py	Fri Apr 30 16:52:27 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_api_unit.py	Tue May 04 12:08:55 2010 +0100
@@ -39,7 +39,7 @@
 		self.failUnlessEqual(set(["alias_A","alias_B","s1","s2"]),
 							 set(a.name for a in aliases))
 		
-		aliases = api.getaliases(None) # ignore type
+		aliases = api.getaliases(raptor_api.ALL) # ignore type
 		self.failUnlessEqual(len(aliases), 6)
 		
 		aliases = api.getaliases("X") # type == "X"