~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Lib/php4/utils.i

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
%define CONVERT_BOOL_IN(lvar,t,invar)
3
 
  convert_to_boolean_ex(invar);
4
 
  lvar = (t) Z_LVAL_PP(invar);
5
 
%enddef
6
 
 
7
 
%define CONVERT_INT_IN(lvar,t,invar)
8
 
  convert_to_long_ex(invar);
9
 
  lvar = (t) Z_LVAL_PP(invar);
10
 
%enddef
11
 
 
12
 
%define CONVERT_INT_OUT(lvar,invar)
13
 
  lvar = (t) Z_LVAL_PP(invar);
14
 
%enddef
15
 
 
16
 
%define CONVERT_FLOAT_IN(lvar,t,invar)
17
 
  convert_to_double_ex(invar);
18
 
  lvar = (t) Z_DVAL_PP(invar);
19
 
%enddef
20
 
 
21
 
%define CONVERT_CHAR_IN(lvar,t,invar)
22
 
  convert_to_string_ex(invar);
23
 
  lvar = (t) *Z_STRVAL_PP(invar);
24
 
%enddef
25
 
 
26
 
%define CONVERT_STRING_IN(lvar,t,invar)
27
 
  convert_to_string_ex(invar);
28
 
  lvar = (t) Z_STRVAL_PP(invar);
29
 
%enddef
30
 
 
31
 
%define %pass_by_val( TYPE, CONVERT_IN )
32
 
%typemap(in) TYPE
33
 
%{
34
 
  CONVERT_IN($1,$1_ltype,$input);
35
 
%}
36
 
%enddef
37
 
 
38
 
%fragment("t_output_helper","header") %{
39
 
void
40
 
t_output_helper( zval **target, zval *o) {
41
 
  if ( (*target)->type == IS_ARRAY ) {
42
 
    /* it's already an array, just append */
43
 
    add_next_index_zval( *target, o );
44
 
    return;
45
 
  }
46
 
  if ( (*target)->type == IS_NULL ) {
47
 
    REPLACE_ZVAL_VALUE(target,o,1);
48
 
    return;
49
 
  }
50
 
  zval *tmp;
51
 
  ALLOC_INIT_ZVAL(tmp);
52
 
  *tmp = **target;
53
 
  zval_copy_ctor(tmp);
54
 
  array_init(*target);
55
 
  add_next_index_zval( *target, tmp);
56
 
  add_next_index_zval( *target, o);
57
 
 
58
 
}
59
 
%}