Print variables from both C and PHP prior to modifications.
Call name_set() with a much shorter argument to make sure nulls are padded. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7466 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ca173a9285
commit
6151879eff
1 changed files with 25 additions and 1 deletions
|
|
@ -1,6 +1,30 @@
|
|||
<?php
|
||||
|
||||
require "example.php";
|
||||
echo "\nVariables (values printed from C)\n";
|
||||
|
||||
print_vars();
|
||||
|
||||
echo "Variables (values printed from PHP)\n";
|
||||
|
||||
echo "ivar = ".ivar_get()."\n";
|
||||
echo "svar = ".svar_get()."\n";
|
||||
echo "lvar = ".lvar_get()."\n";
|
||||
echo "uivar = ".uivar_get()."\n";
|
||||
echo "usvar = ".usvar_get()."\n";
|
||||
echo "ulvar = ".ulvar_get()."\n";
|
||||
echo "scvar = ".scvar_get()."\n";
|
||||
echo "ucvar = ".ucvar_get()."\n";
|
||||
echo "cvar = ".cvar_get()."\n";
|
||||
echo "fvar = ".fvar_get()."\n";
|
||||
echo "dvar = ".dvar_get()."\n";
|
||||
echo "strvar = ".strvar_get()."\n";
|
||||
echo "cstrvar = ".cstrvar_get()."\n";
|
||||
echo "iptrvar = ".iptrvar_get()."\n";
|
||||
echo "name = \"".name_get()."\"\n";
|
||||
echo "ptptr = ".ptptr_get() , point_print(ptptr_get()) , "\n";
|
||||
echo "pt = ".pt_get(), point_print(pt_get()) , "\n";
|
||||
|
||||
/* Try to set the values of some global variables */
|
||||
$a = "42.14";
|
||||
|
||||
|
|
@ -19,7 +43,7 @@ echo "a = $a\n";
|
|||
strvar_set("Hello World");
|
||||
iptrvar_set(new_int(37));
|
||||
ptptr_set(new_point(37,42));
|
||||
name_set("Bill");
|
||||
name_set("B");
|
||||
|
||||
echo "Variables (values printed from PHP)\n";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue