| 1 |
%typemap(in) librdf_uri* %{ |
| 2 |
if(SWIG_ConvertPtr(*$input, (void **) &$1, SWIGTYPE_p_librdf_uri_s, 0) < 0) { |
| 3 |
/* Allow NULL from php for librdf_uri* */ |
| 4 |
if ((*$input)->type==IS_NULL) |
| 5 |
$1=NULL; |
| 6 |
else |
| 7 |
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $1_descriptor"); |
| 8 |
} |
| 9 |
%} |
| 10 |
|
| 11 |
%typemap(in) librdf_node* %{ |
| 12 |
if(SWIG_ConvertPtr(*$input, (void **) &$1, SWIGTYPE_p_librdf_node_s, 0) < 0) { |
| 13 |
/* Allow NULL from php for librdf_node* */ |
| 14 |
if ((*$input)->type==IS_NULL) |
| 15 |
$1=NULL; |
| 16 |
else |
| 17 |
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $1_descriptor"); |
| 18 |
} |
| 19 |
%} |
| 20 |
|
| 21 |
%typemap(out) librdf_node*, librdf_stream*, librdf_iterator* %{ |
| 22 |
if(!$1) { |
| 23 |
ZVAL_NULL(return_value); |
| 24 |
} else { |
| 25 |
SWIG_SetPointerZval(return_value, (void *)$1, $1_descriptor, $owner); |
| 26 |
} |
| 27 |
%} |
| 28 |
|
| 29 |
%pragma(php4) phpinfo=" |
| 30 |
php_info_print_table_start(); |
| 31 |
php_info_print_table_header(2, \"Redland RDF Support\", \"enabled\"); |
| 32 |
php_info_print_table_row(2, \"redland librdf version\", librdf_version_string); |
| 33 |
php_info_print_table_row(2, \"redland php bindings version\", REDLAND_BINDINGS_VERSION); |
| 34 |
php_info_print_table_end(); |
| 35 |
" |
| 36 |
|
| 37 |
%pragma(php5) phpinfo=" |
| 38 |
php_info_print_table_start(); |
| 39 |
php_info_print_table_header(2, \"Redland RDF Support\", \"enabled\"); |
| 40 |
php_info_print_table_row(2, \"redland librdf version\", librdf_version_string); |
| 41 |
php_info_print_table_row(2, \"redland php bindings version\", REDLAND_BINDINGS_VERSION); |
| 42 |
php_info_print_table_end(); |
| 43 |
" |
| 44 |
|
| 45 |
%mshutdown { |
| 46 |
librdf_php_world_finish(); |
| 47 |
} |
| 48 |
|
| 49 |
#if PHP_MAJOR_VERSION >= 5 |
| 50 |
%exception { |
| 51 |
$action |
| 52 |
if(librdf_php_log_message) |
| 53 |
librdf_php_check_exception(); |
| 54 |
} |
| 55 |
#endif |