~ubuntu-branches/ubuntu/trusty/lasso/trusty

« back to all changes in this revision

Viewing changes to bindings/php5/wrapper_source.py

  • Committer: Package Import Robot
  • Author(s): Frederic Peters
  • Date: 2014-01-07 13:22:21 UTC
  • mfrom: (1.1.11) (7.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140107132221-htp0go0s9z5lqvj8
Tags: 2.4.0-1
* New upstream version.
* debian/control, debian/rules: use autoreconf
* debian/source/version: switch to 3.0 (quilt)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# GNU General Public License for more details.
17
17
#
18
18
# You should have received a copy of the GNU General Public License
19
 
# along with this program; if not, write to the Free Software
20
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
# along with this program; if not, see <http://www.gnu.org/licenses/>.
21
20
 
22
21
import sys
23
22
import os
185
184
    } else {
186
185
        RETVAL_NULL();
187
186
    }'''
188
 
            if free or is_transfer_full(arg):
 
187
            if free:
189
188
                print >> self.fd, '    free(return_c_value);'
190
189
        elif is_xml_node(arg):
191
190
            print >> self.fd, '''\
198
197
        }
199
198
    }
200
199
'''
 
200
            if free:
 
201
                print >> self.fd, '    lasso_release_xml_node(return_c_value);'
201
202
        elif is_glist(arg):
202
203
            el_type = element_type(arg)
203
204
            if is_cstring(el_type):
204
205
                print >> self.fd, '''\
205
206
    set_array_from_list_of_strings((GList*)return_c_value, &return_value);
206
207
'''
207
 
                if free or is_transfer_full(arg):
 
208
                if free:
208
209
                    print >> self.fd, '    lasso_release_list_of_strings(return_c_value);'
209
210
            elif is_xml_node(el_type):
210
211
                print >> self.fd, '''\
216
217
                print >> self.fd, '''\
217
218
    set_array_from_list_of_objects((GList*)return_c_value, &return_value);
218
219
'''
219
 
                if free or is_transfer_full(arg):
 
220
                if free:
220
221
                    print >> self.fd, '    lasso_release_list_of_gobjects(return_c_value);'
221
222
            else:
222
223
                raise Exception('cannot return value for %s' % (arg,))
371
372
                    print >> self.fd, '    }'
372
373
 
373
374
        try:
374
 
            self.return_value(m.return_arg, is_transfer_full(m.return_arg))
 
375
            self.return_value(m.return_arg, is_transfer_full(m.return_arg, default=True))
375
376
        except:
376
377
            raise Exception('Cannot return value for function %s' % m)
377
378