From 207891ff2946db888c80b15f77e7cce15bfcc006 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 5 Aug 2008 14:53:29 +0000 Subject: * Fix blanks mismatch (space in *.c and *h files or tabs in *.py files) and formatting --- bindings/bindings.py | 2 +- bindings/java/lang.py | 18 +++++++++--------- bindings/php5/wrapper_source.py | 2 +- bindings/python/tests/Makefile.am | 3 ++- bindings/python/tests/idwsf1_tests.py | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) (limited to 'bindings') diff --git a/bindings/bindings.py b/bindings/bindings.py index 458c5ff3..bdfd6417 100644 --- a/bindings/bindings.py +++ b/bindings/bindings.py @@ -102,7 +102,7 @@ class BindingData: arg_type = f.args[0][0] if arg_type[-1] == '*': arg_type = arg_type[:-1] - arg_type = arg_type.replace('const ','') + arg_type = arg_type.replace('const ','') c = self.struct_dict.get(arg_type) if not c: continue diff --git a/bindings/java/lang.py b/bindings/java/lang.py index e517ed21..b4249052 100644 --- a/bindings/java/lang.py +++ b/bindings/java/lang.py @@ -106,7 +106,7 @@ def is_const_type(type): class Binding: def __init__(self, binding_data): self.binding_data = binding_data - self.src_dir = os.path.dirname(__file__) + self.src_dir = os.path.dirname(__file__) def print_list_of_files(self): l = ['GObject.java','LassoConstants.java','LassoJNI.java','LassoException.java', 'LassoUndefinedException.java', 'LassoUnimplementedException.java'] @@ -168,13 +168,13 @@ public abstract interface LassoConstants { # Declaration for c in self.binding_data.constants: print >> fd, 'static final ', - if c[0] == 'i': - print >> fd, 'int ', - elif c[0] == 's': - print >> fd, 'String ', + if c[0] == 'i': + print >> fd, 'int ', + elif c[0] == 's': + print >> fd, 'String ', elif c[0] == 'b': print >> fd, 'boolean ', - print >> fd, '%s = LassoJNI.%s_get();' % (c[1][6:], c[1]) + print >> fd, '%s = LassoJNI.%s_get();' % (c[1][6:], c[1]) def generate_Constants_footer(self, fd): print >> fd, '}' @@ -235,9 +235,9 @@ protected static native void destroy(long cptr); return 'GObject' def JNI_return_type(self, vtype): - if vtype: - m = re.match(r'(?:const\s*)?(.*)',vtype) - vtype = m.group(1) + if vtype: + m = re.match(r'(?:const\s*)?(.*)',vtype) + vtype = m.group(1) if vtype == 'gboolean': return 'boolean' elif vtype in ['int','gint'] + self.binding_data.enums: diff --git a/bindings/php5/wrapper_source.py b/bindings/php5/wrapper_source.py index 8279d3db..319b9671 100644 --- a/bindings/php5/wrapper_source.py +++ b/bindings/php5/wrapper_source.py @@ -29,7 +29,7 @@ class WrapperSource: self.binding_data = binding_data self.fd = fd self.functions_list = [] - self.src_dir = os.path.dirname(__file__) + self.src_dir = os.path.dirname(__file__) def is_object(self, t): return t not in ['char*', 'const char*', 'gchar*', 'const gchar*', 'GList*', 'GHashTable*', diff --git a/bindings/python/tests/Makefile.am b/bindings/python/tests/Makefile.am index 8b3791b3..64dfc090 100644 --- a/bindings/python/tests/Makefile.am +++ b/bindings/python/tests/Makefile.am @@ -1,7 +1,8 @@ MAINTAINERCLEANFILES = Makefile.in +TESTS = # if PYTHON_ENABLED -TESTS = profiles_tests.py binding_tests.py +TESTS += profiles_tests.py binding_tests.py endif if WSF_ENABLED diff --git a/bindings/python/tests/idwsf1_tests.py b/bindings/python/tests/idwsf1_tests.py index 1867b19b..3dc5cf86 100755 --- a/bindings/python/tests/idwsf1_tests.py +++ b/bindings/python/tests/idwsf1_tests.py @@ -187,7 +187,7 @@ class DiscoveryModifyTestCase(IdWsf1TestCase): idp_disco.processModifyMsg(wsp_disco.msgBody) idp_disco.setIdentityFromDump(idp_identity_dump) idp_disco.buildModifyResponseMsg() - offerings = idp_disco.identity.getOfferings() + offerings = idp_disco.identity.getOfferings() self.failUnless('' in idp_disco.msgBody) self.failUnless('urn:liberty:id-sis-pp:2003-08' in @@ -220,7 +220,7 @@ class DiscoveryRemoveTestCase(IdWsf1TestCase): idp_disco = lasso.Discovery(self.idp) idp_disco.processModifyMsg(wsp_disco.msgBody) idp_disco.setIdentityFromDump(idp_identity_dump) - offering = self.get_resource_offering() + offering = self.get_resource_offering() idp_disco.getIdentity().addResourceOffering(offering) self.failUnless('urn:liberty:id-sis-pp:2003-08' in idp_disco.identity.dump()) -- cgit