diff options
-rw-r--r-- | bindings/bindings.py | 14 | ||||
-rw-r--r-- | bindings/java/Makefile.am | 10 | ||||
-rw-r--r-- | bindings/lang_java.py | 8 | ||||
-rw-r--r-- | bindings/lang_php5_helpers/php_code.py | 4 | ||||
-rw-r--r-- | bindings/overrides.xml | 4 | ||||
-rw-r--r-- | bindings/php5/Makefile.am | 8 | ||||
-rw-r--r-- | bindings/python/Makefile.am | 6 |
7 files changed, 42 insertions, 12 deletions
diff --git a/bindings/bindings.py b/bindings/bindings.py index 8c90adbd..958c3e38 100644 --- a/bindings/bindings.py +++ b/bindings/bindings.py @@ -81,9 +81,10 @@ class BindingData: if not c: continue c.methods.append(f) - if f.docstring: + if f.docstring and f.docstring.parameters: # remove first parameter, which is self/this/etc. f.docstring.parameters = f.docstring.parameters[1:] + self.functions.remove(f) def look_for_docstrings(self, srcdir, exception_doc): @@ -177,11 +178,18 @@ class Function: self.return_type = func.attrib.get('return_type') if func.attrib.get('skip') == 'true': self.skip = True + for param in binding.overrides.findall('arg'): + arg_name = param.attrib.get('name') + arg_sub = param.attrib.get('substitute') + if arg_name and arg_sub: + args = [ x for x in self.args if x[1] == arg_name] + for arg in args: + arg[1] = arg_sub class DocString: orig_docstring = None - parameters = None + parameters = [] return_value = None description = None @@ -200,7 +208,7 @@ class DocString: self.parameters = [] if lines[0][0] == '@': - param_name, param_desc = lines[0][1:].split(':', 2) + param_name, param_desc = lines[0][1:].split(':', 1) self.parameters.append([param_name, param_desc]) else: # continuation of previous description diff --git a/bindings/java/Makefile.am b/bindings/java/Makefile.am index ce3b0aa1..7c2b6e39 100644 --- a/bindings/java/Makefile.am +++ b/bindings/java/Makefile.am @@ -9,7 +9,11 @@ CLASSPATH=.:tests java_extension_LTLIBRARIES = libjnilasso.la java_extensiondir = ${libdir}/java -java_lasso_source_files = $(shell python $(top_srcdir)/bindings/bindings.py -l java-list --src-dir=$(top_srcdir)/lasso/) +if WSF_ENABLED +EXTRA_ARGS = --enable-id-wsf +endif + +java_lasso_source_files = $(shell python $(top_srcdir)/bindings/bindings.py -l java-list --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) ) lasso_jardir=$(prefix)/share/java lasso_jar_DATA=lasso.jar @@ -35,7 +39,7 @@ doc: com_entrouvert_lasso_LassoJNI.h: com/entrouvert/lasso/LassoJNI.class $(java_lasso_source_files:.java=.class) $(JAVAH) $(JAVAH_FLAGS) -classpath . `echo $< | sed 'su/u.ug;su.classuu'` -libjnilasso_la_CFLAGS = -fno-strict-aliasing $(LASSO_CORE_CFLAGS) -I$(top_srcdir) -I$(top_builddir) +libjnilasso_la_CFLAGS = -fno-strict-aliasing $(LASSO_CORE_CFLAGS) -I$(top_srcdir) -I$(top_builddir) @JAVA_INCLUDE@ libjnilasso_la_LDFLAGS = -export-dynamic -prefer-pic -module -avoid-version libjnilasso_la_LIBADD = $(top_builddir)/lasso/liblasso.la $(LASSO_LIBS) nodist_libjnilasso_la_SOURCES = com_entrouvert_lasso_LassoJNI.c @@ -45,7 +49,7 @@ BUILT_SOURCES = com_entrouvert_lasso_LassoJNI.c com_entrouvert_lasso_LassoJNI.h BINDING_OPTION=#--enable-exception-docs $(java_lasso_source_files) com_entrouvert_lasso_LassoJNI.c: ../lang_java_wrapper_top.c ../lang_java.py - $(PYTHON) $(top_srcdir)/bindings/bindings.py $(BINDING_OPTION) -l java --src-dir=$(top_srcdir)/lasso/ + $(PYTHON) $(top_srcdir)/bindings/bindings.py $(BINDING_OPTION) -l java --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) cp $(srcdir)/GObject.java com/entrouvert/lasso diff --git a/bindings/lang_java.py b/bindings/lang_java.py index 7e8cf4c7..84aa885f 100644 --- a/bindings/lang_java.py +++ b/bindings/lang_java.py @@ -850,9 +850,13 @@ protected static native void destroy(long cptr); str = re.sub(r'(a +)?#?GList\*?','an array', str) return wrapper.fill(re.sub(r'@\b(\w+)\b',r'\1',str)) if doc: - print >> fd, normalize(doc.description, ' /** ') + first = normalize(doc.description, ' /** ') + if first: + print >> fd, first + else: + print >> fd, ' /**\n' print >> fd, ' *' - for name, desc in doc.parameters[1:]: + for name, desc in doc.parameters: print >> fd, normalize(desc, ' * @param %s ' % utils.format_as_camelcase(name)) if doc.return_value: print >> fd, normalize(doc.return_value, ' * @return ') diff --git a/bindings/lang_php5_helpers/php_code.py b/bindings/lang_php5_helpers/php_code.py index d24b3305..5c175f87 100644 --- a/bindings/lang_php5_helpers/php_code.py +++ b/bindings/lang_php5_helpers/php_code.py @@ -144,6 +144,7 @@ function getRequestTypeFromSoapMsg($mesg) { print >> self.fd, '' print >> self.fd, ' public function __construct(%s) {' % php_args print >> self.fd, ' $this->_cptr = %s(%s);' % (m.name, c_args) + print >> self.fd, ' if (is_null($this->_cptr)) { throw new Exception("Constructor for ', klass.name, ' failed "); }' print >> self.fd, ' }' print >> self.fd, '' @@ -422,7 +423,7 @@ class Lasso%sError extends Lasso%sError {} continue cat, detail = m.groups() cat = cat.title().replace('_', '') - detail = detail.title().replace('_', '') + detail = (cat + '_' + detail).title().replace('_', '') if not cat in done_cats: done_cats.append(cat) for exc_cat in self.binding_data.overrides.findall('exception/category'): @@ -475,5 +476,6 @@ class LassoError extends Exception { def generate_footer(self): print >> self.fd, '''\ + lasso_init(); ?>''' diff --git a/bindings/overrides.xml b/bindings/overrides.xml index fc47a13d..6ab2e0ae 100644 --- a/bindings/overrides.xml +++ b/bindings/overrides.xml @@ -106,6 +106,10 @@ <func name="lasso_lib_register_name_identifier_request_new_full" return_type="LassoLibRegisterNameIdentifierRequest*"/> <!-- LassoServer --> <func name="lasso_server_get_provider" return_owner="false" /> + <!-- IdWsf --> + <arg name="abstract" substitute="abstract_"/> + <func name="lasso_personal_profile_service_new_full" rename="lasso_personal_profile_server_new_personal_profile_service_full"/> + <func name="lasso_authentication_init_request" skip="true"/> <!-- Exceptions --> <exception> diff --git a/bindings/php5/Makefile.am b/bindings/php5/Makefile.am index 17c5278c..94b22ee5 100644 --- a/bindings/php5/Makefile.am +++ b/bindings/php5/Makefile.am @@ -15,8 +15,12 @@ nodist_lasso_la_SOURCES = _lasso.c BUILT_SOURCES = _lasso.c -lasso.php _lasso.c: - $(PYTHON) $(top_srcdir)/bindings/bindings.py -l php5 --src-dir=$(top_srcdir)/lasso/ +if WSF_ENABLED +EXTRA_ARGS = --enable-id-wsf +endif + +lasso.php _lasso.c: ../lang_php5.py ../lang_php5_helpers/php_code.py + $(PYTHON) $(top_srcdir)/bindings/bindings.py -l php5 --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) doc: phpdoc -o HTML:frames:earthli -f lasso.php -t docs diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index 62facaff..5e4c62a7 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -24,8 +24,12 @@ endif BUILT_SOURCES = _lasso.c +if WSF_ENABLED +EXTRA_ARGS = --enable-id-wsf +endif + _lasso.c: - $(PYTHON) $(top_srcdir)/bindings/bindings.py -l python --src-dir=$(top_srcdir)/lasso/ + $(PYTHON) $(top_srcdir)/bindings/bindings.py -l python --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) clean-local: -rm -f lasso.py lasso.pyc _lasso.c |