diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2008-04-29 12:07:47 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2008-04-29 12:07:47 +0000 |
commit | 04960b6de8d8c7ef23d6e1805b5161b06313f314 (patch) | |
tree | 184003d9da4dcf9fc1e582c05f586890c007e52a | |
parent | aaec8ae3c1f251a8cebf3eb68c95b40b89041467 (diff) | |
download | lasso-04960b6de8d8c7ef23d6e1805b5161b06313f314.tar.gz lasso-04960b6de8d8c7ef23d6e1805b5161b06313f314.tar.xz lasso-04960b6de8d8c7ef23d6e1805b5161b06313f314.zip |
[project @ fpeters@0d.be-20080227102117-mbx90lw49ty9vfq9]
rename lasso_profile_is_identity_dirty to lasso_profile_has_dirty_identity
(and ditto with s/identity/session/) to provide both correct documentation
and backward compatibility in Python bindings
Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-02-27 11:21:17.023000+01:00
-rw-r--r-- | bindings/lang_python.py | 19 | ||||
-rw-r--r-- | bindings/overrides.xml | 4 |
2 files changed, 16 insertions, 7 deletions
diff --git a/bindings/lang_python.py b/bindings/lang_python.py index 6b904384..d58c7cac 100644 --- a/bindings/lang_python.py +++ b/bindings/lang_python.py @@ -173,8 +173,8 @@ import lasso WSF_SUPPORT = WSF_ENABLED -Profile.isIdentityDirty = property(Profile.isIdentityDirty) -Profile.isSessionDirty = property(Profile.isSessionDirty) +Profile.isIdentityDirty = property(Profile.hasDirtyIdentity) +Profile.isSessionDirty = property(Profile.hasDirtySession) def identity_get_provider_ids(self): return self.federations.keys() @@ -380,7 +380,12 @@ StringDict = dict print >> sys.stderr, 'W:', m.name, 'vs', method_prefix continue - mname = m.name[len(method_prefix):] + if m.rename: + mname = m.rename[len(method_prefix):] + function_name = m.rename[6:] + else: + mname = m.name[len(method_prefix):] + function_name = m.name[6:] py_args = [] c_args = [] for o in m.args[1:]: @@ -421,10 +426,10 @@ StringDict = dict print >> fd, " '''" if m.return_type in (None, 'void'): print >> fd, ' _lasso.%s(self._cptr%s)' % ( - m.name[6:], c_args) + function_name, c_args) elif m.return_type in ('gint', 'int'): print >> fd, ' rc = _lasso.%s(self._cptr%s)' % ( - m.name[6:], c_args) + function_name, c_args) print >> fd, ' if rc == 0:' print >> fd, ' return' print >> fd, ' elif rc > 0:' # recoverable error @@ -433,10 +438,10 @@ StringDict = dict print >> fd, ' raise Error.raise_on_rc(rc)' elif self.is_pygobject(m.return_type): print >> fd, ' return cptrToPy(_lasso.%s(self._cptr%s))' % ( - m.name[6:], c_args) + function_name, c_args) else: print >> fd, ' return _lasso.%s(self._cptr%s)' % ( - m.name[6:], c_args) + function_name, c_args) print >> fd, '' print >> fd, '' diff --git a/bindings/overrides.xml b/bindings/overrides.xml index d88ae405..72895939 100644 --- a/bindings/overrides.xml +++ b/bindings/overrides.xml @@ -15,6 +15,10 @@ return_owner="false" /> <func name="lasso_profile_get_identity" return_owner="false" /> <func name="lasso_profile_get_session" return_owner="false" /> + <func name="lasso_profile_is_identity_dirty" + rename="lasso_profile_has_dirty_identity"/> + <func name="lasso_profile_is_session_dirty" + rename="lasso_profile_has_dirty_session"/> <!-- LassoWsfProfile --> <func name="lasso_wsf_profile_get_identity" return_owner="false" /> <func name="lasso_wsf_profile_get_session" return_owner="false" /> |