Test const char [] instead of const char *
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5992 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2760a2b61e
commit
db374a14f4
21 changed files with 14 additions and 22 deletions
|
|
@ -18,7 +18,7 @@ char cvar = 0;
|
|||
float fvar = 0;
|
||||
double dvar = 0;
|
||||
char *strvar = 0;
|
||||
const char *cstrvar = 0;
|
||||
const char cstrvar[] = "Goodbye";
|
||||
int *iptrvar = 0;
|
||||
char name[256] = "Dave";
|
||||
char path[256] = "/home/beazley";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ extern char cvar;
|
|||
extern float fvar;
|
||||
extern double dvar;
|
||||
extern char *strvar;
|
||||
extern const char *cstrvar;
|
||||
extern const char cstrvar[];
|
||||
extern int *iptrvar;
|
||||
extern char name[256];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ public class main {
|
|||
example.setFvar((float)3.14159);
|
||||
example.setDvar(2.1828);
|
||||
example.setStrvar("Hello World");
|
||||
example.setCstrvar("Goodbye");
|
||||
example.setIptrvar(example.new_int(37));
|
||||
example.setPtptr(example.new_Point(37,42));
|
||||
example.setName("Bill");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue