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:
William S Fulton 2004-06-15 20:12:22 +00:00
parent 2760a2b61e
commit db374a14f4
21 changed files with 14 additions and 22 deletions

View File

@ -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";

View File

@ -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];

View File

@ -21,7 +21,6 @@ public class runme {
example.fvar = (float)3.14159;
example.dvar = 2.1828;
example.strvar = "Hello World";
example.cstrvar = "Goodbye";
example.iptrvar= example.new_int(37);
example.ptptr = example.new_Point(37,42);
example.name = "Bill";

View File

@ -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";

View File

@ -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];

View File

@ -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");

View File

@ -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";

View File

@ -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];

View File

@ -16,7 +16,6 @@ $example::cvar = "S";
$example::fvar = 3.14159;
$example::dvar = 2.1828;
$example::strvar = "Hello World";
$example::cstrvar = "Goodbye";
$example::iptrvar= example::new_int(37);
$example::ptptr = example::new_Point(37,42);
$example::name = "Bill";

View File

@ -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";

View File

@ -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];

View File

@ -15,7 +15,6 @@
fvar_set(3.14159);
dvar_set(2.1828);
strvar_set("Hello World");
cstrvar_set("Goodbye");
iptrvar_set(new_int(37));
ptptr_set(new_point(37,42));
name_set("Bill");

View File

@ -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";

View File

@ -1,6 +1,5 @@
/* File : example.i */
%module example
#pragma SWIG nowarn=451
%{
#include "example.h"
%}
@ -18,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];

View File

@ -16,7 +16,6 @@ example.cvar.cvar = "S"
example.cvar.fvar = 3.14159
example.cvar.dvar = 2.1828
example.cvar.strvar = "Hello World"
example.cvar.cstrvar = "Goodbye"
example.cvar.iptrvar= example.new_int(37)
example.cvar.ptptr = example.new_Point(37,42)
example.cvar.name = "Bill"

View File

@ -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";

View File

@ -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];

View File

@ -16,7 +16,6 @@ Example.cvar = "S"
Example.fvar = 3.14159
Example.dvar = 2.1828
Example.strvar = "Hello World"
Example.cstrvar = "Goodbye"
Example.iptrvar= Example.new_int(37)
Example.ptptr = Example.new_Point(37,42)
Example.name = "Bill"

View File

@ -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";

View File

@ -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];

View File

@ -16,7 +16,6 @@ set cvar "S"
set fvar 3.14159
set dvar 2.1828
set strvar "Hello World"
set cstrvar "Goodbye"
set iptrvar [new_int 37]
set ptptr [new_Point 37 42]
set name "Bill"