Replaced all [const] String_or_char * to const_String_or_char_ptr, by the following command:
sed -i "s/\(const \)\?String_or_char \*/const_String_or_char_ptr /g" CParse/* Include/* Modules/* Preprocessor/* Swig/* This is a preparation for moving to new DOH, since for strong typed objects we need the const_String_or_char_ptr class to implicit convert to and from String * or const char *. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
061cad9b54
commit
6d2aef67d9
39 changed files with 230 additions and 226 deletions
|
|
@ -625,7 +625,7 @@ void note_implicit_template_instantiation(SwigType *t) {
|
|||
add_defined_foreign_type(0, 0, t, t, implicit_ns ? implicit_ns : current_namespace);
|
||||
}
|
||||
|
||||
String *get_ffi_type(SwigType *ty, const String_or_char *name) {
|
||||
String *get_ffi_type(SwigType *ty, const_String_or_char_ptr name) {
|
||||
/* lookup defined foreign type.
|
||||
if it exists, it will return a form suitable for placing
|
||||
into lisp code to generate the def-foreign-type name */
|
||||
|
|
@ -1962,7 +1962,7 @@ int any_varargs(ParmList *pl) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
String *get_lisp_type(SwigType *ty, const String_or_char *name) {
|
||||
String *get_lisp_type(SwigType *ty, const_String_or_char_ptr name) {
|
||||
Hash *typemap = Swig_typemap_search("lisptype", ty, name, 0);
|
||||
if (typemap) {
|
||||
String *typespec = Getattr(typemap, "code");
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@ protected:
|
|||
int isPointer(SwigType *t);
|
||||
void dispatchFunction(Node *n);
|
||||
|
||||
String *chickenNameMapping(String *, String_or_char *);
|
||||
String *chickenNameMapping(String *, const_String_or_char_ptr );
|
||||
String *chickenPrimitiveName(String *);
|
||||
|
||||
String *runtimeCode();
|
||||
String *defaultExternalRuntimeFilename();
|
||||
String *buildClosFunctionCall(List *types, String_or_char *closname, String_or_char *funcname);
|
||||
String *buildClosFunctionCall(List *types, const_String_or_char_ptr closname, const_String_or_char_ptr funcname);
|
||||
};
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
|
|
@ -1234,7 +1234,7 @@ int CHICKEN::importDirective(Node *n) {
|
|||
return Language::importDirective(n);
|
||||
}
|
||||
|
||||
String *CHICKEN::buildClosFunctionCall(List *types, String_or_char *closname, String_or_char *funcname) {
|
||||
String *CHICKEN::buildClosFunctionCall(List *types, const_String_or_char_ptr closname, const_String_or_char_ptr funcname) {
|
||||
String *method_signature = NewString("");
|
||||
String *func_args = NewString("");
|
||||
String *func_call = NewString("");
|
||||
|
|
@ -1508,7 +1508,7 @@ int CHICKEN::validIdentifier(String *s) {
|
|||
* If class_name = "" that means the mapping is for a function or
|
||||
* variable not attached to any class.
|
||||
* ------------------------------------------------------------ */
|
||||
String *CHICKEN::chickenNameMapping(String *name, String_or_char *class_name) {
|
||||
String *CHICKEN::chickenNameMapping(String *name, const_String_or_char_ptr class_name) {
|
||||
String *n = NewString("");
|
||||
|
||||
if (Strcmp(class_name, "") == 0) {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class CSHARP:public Language {
|
|||
|
||||
enum EnumFeature { SimpleEnum, TypeunsafeEnum, TypesafeEnum, ProperEnum };
|
||||
|
||||
static Parm *NewParmFromNode(SwigType *type, const String_or_char *name, Node *n) {
|
||||
static Parm *NewParmFromNode(SwigType *type, const_String_or_char_ptr name, Node *n) {
|
||||
Parm *p = NewParm(type, name);
|
||||
Setfile(p, Getfile(n));
|
||||
Setline(p, Getline(n));
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ String *Swig_director_declaration(Node *n) {
|
|||
}
|
||||
|
||||
|
||||
String *Swig_method_call(String_or_char *name, ParmList *parms) {
|
||||
String *Swig_method_call(const_String_or_char_ptr name, ParmList *parms) {
|
||||
String *func;
|
||||
int i = 0;
|
||||
int comma = 0;
|
||||
|
|
@ -128,7 +128,7 @@ String *Swig_method_call(String_or_char *name, ParmList *parms) {
|
|||
*
|
||||
*/
|
||||
|
||||
String *Swig_method_decl(SwigType *returntype, SwigType *decl, const String_or_char *id, List *args, int strip, int values) {
|
||||
String *Swig_method_decl(SwigType *returntype, SwigType *decl, const_String_or_char_ptr id, List *args, int strip, int values) {
|
||||
String *result;
|
||||
List *elements;
|
||||
String *element = 0, *nextelement;
|
||||
|
|
|
|||
|
|
@ -1654,7 +1654,7 @@ public:
|
|||
* If class_name = "" that means the mapping is for a function or
|
||||
* variable not attached to any class.
|
||||
* ------------------------------------------------------------ */
|
||||
String *goopsNameMapping(String *name, String_or_char *class_name) {
|
||||
String *goopsNameMapping(String *name, const_String_or_char_ptr class_name) {
|
||||
String *n = NewString("");
|
||||
|
||||
if (Strcmp(class_name, "") == 0) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class JAVA:public Language {
|
|||
|
||||
enum EnumFeature { SimpleEnum, TypeunsafeEnum, TypesafeEnum, ProperEnum };
|
||||
|
||||
static Parm *NewParmFromNode(SwigType *type, const String_or_char *name, Node *n) {
|
||||
static Parm *NewParmFromNode(SwigType *type, const_String_or_char_ptr name, Node *n) {
|
||||
Parm *p = NewParm(type, name);
|
||||
Setfile(p, Getfile(n));
|
||||
Setline(p, Getline(n));
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ static void set_outdir(const String *c_wrapper_file_dir) {
|
|||
}
|
||||
|
||||
/* This function sets the name of the configuration file */
|
||||
void SWIG_config_file(const String_or_char *filename) {
|
||||
void SWIG_config_file(const_String_or_char_ptr filename) {
|
||||
lang_config = NewString(filename);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ static bool print_typecheck(String *f, int j, Parm *pj) {
|
|||
* ReplaceFormat()
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
static String *ReplaceFormat(const String_or_char *fmt, int j) {
|
||||
static String *ReplaceFormat(const_String_or_char_ptr fmt, int j) {
|
||||
String *lfmt = NewString(fmt);
|
||||
char buf[50];
|
||||
sprintf(buf, "%d", j);
|
||||
|
|
@ -352,7 +352,7 @@ static String *ReplaceFormat(const String_or_char *fmt, int j) {
|
|||
/*
|
||||
Cast dispatch mechanism.
|
||||
*/
|
||||
String *Swig_overload_dispatch_cast(Node *n, const String_or_char *fmt, int *maxargs) {
|
||||
String *Swig_overload_dispatch_cast(Node *n, const_String_or_char_ptr fmt, int *maxargs) {
|
||||
int i, j;
|
||||
|
||||
*maxargs = 1;
|
||||
|
|
@ -536,7 +536,7 @@ String *Swig_overload_dispatch_cast(Node *n, const String_or_char *fmt, int *max
|
|||
/*
|
||||
Fast dispatch mechanism, provided by Salvador Fandi~no Garc'ia (#930586).
|
||||
*/
|
||||
String *Swig_overload_dispatch_fast(Node *n, const String_or_char *fmt, int *maxargs) {
|
||||
String *Swig_overload_dispatch_fast(Node *n, const_String_or_char_ptr fmt, int *maxargs) {
|
||||
int i, j;
|
||||
|
||||
*maxargs = 1;
|
||||
|
|
@ -695,7 +695,7 @@ String *Swig_overload_dispatch_fast(Node *n, const String_or_char *fmt, int *max
|
|||
return f;
|
||||
}
|
||||
|
||||
String *Swig_overload_dispatch(Node *n, const String_or_char *fmt, int *maxargs) {
|
||||
String *Swig_overload_dispatch(Node *n, const_String_or_char_ptr fmt, int *maxargs) {
|
||||
|
||||
if (fast_dispatch_mode || GetFlag(n, "feature:fastdispatch")) {
|
||||
return Swig_overload_dispatch_fast(n, fmt, maxargs);
|
||||
|
|
|
|||
|
|
@ -1934,7 +1934,7 @@ public:
|
|||
return NewStringEmpty();
|
||||
}
|
||||
|
||||
String *PhpTypeFromTypemap(char *op, Node *n, String_or_char *lname) {
|
||||
String *PhpTypeFromTypemap(char *op, Node *n, const_String_or_char_ptr lname) {
|
||||
String *tms = Swig_typemap_lookup(op, n, lname, 0);
|
||||
if (!tms)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ public:
|
|||
* name (i.e. "enum_test").
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
String *strip(const DOHString_or_char *name) {
|
||||
String *strip(const DOHconst_String_or_char_ptr name) {
|
||||
String *s = Copy(name);
|
||||
if (Strncmp(name, PrefixPlusUnderscore, Len(PrefixPlusUnderscore)) != 0) {
|
||||
return s;
|
||||
|
|
@ -237,7 +237,7 @@ public:
|
|||
* add_method()
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
void add_method(const DOHString_or_char *name, const DOHString_or_char *function, const DOHString_or_char *description) {
|
||||
void add_method(const DOHconst_String_or_char_ptr name, const DOHconst_String_or_char_ptr function, const DOHconst_String_or_char_ptr description) {
|
||||
String *rename = NULL;
|
||||
switch (current) {
|
||||
case NO_CPP:
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
Delete(temp);
|
||||
}
|
||||
|
||||
void set_name(const String_or_char *cn, const String_or_char *rn, const String_or_char *valn) {
|
||||
void set_name(const_String_or_char_ptr cn, const_String_or_char_ptr rn, const_String_or_char_ptr valn) {
|
||||
/* Original C/C++ class (or struct) name */
|
||||
Clear(cname);
|
||||
Append(cname, cn);
|
||||
|
|
@ -104,7 +104,7 @@ public:
|
|||
Printv(prefix, (rn ? rn : cn), "_", NIL);
|
||||
}
|
||||
|
||||
char *strip(const String_or_char *s) {
|
||||
char *strip(const_String_or_char_ptr s) {
|
||||
Clear(temp);
|
||||
Append(temp, s);
|
||||
if (Strncmp(s, prefix, Len(prefix)) == 0) {
|
||||
|
|
@ -1228,7 +1228,7 @@ public:
|
|||
/**
|
||||
* Process the comma-separated list of aliases (if any).
|
||||
*/
|
||||
void defineAliases(Node *n, const String_or_char *iname) {
|
||||
void defineAliases(Node *n, const_String_or_char_ptr iname) {
|
||||
String *aliasv = Getattr(n, "feature:alias");
|
||||
if (aliasv) {
|
||||
List *aliases = Split(aliasv, ',', INT_MAX);
|
||||
|
|
@ -1262,7 +1262,7 @@ public:
|
|||
* as another instance of the same class.
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
void create_command(Node *n, const String_or_char *iname) {
|
||||
void create_command(Node *n, const_String_or_char_ptr iname) {
|
||||
|
||||
String *alloc_func = Swig_name_wrapper(iname);
|
||||
String *wname = Swig_name_wrapper(iname);
|
||||
|
|
@ -2566,7 +2566,7 @@ public:
|
|||
|
||||
/* First wrap the allocate method */
|
||||
current = CONSTRUCTOR_ALLOCATE;
|
||||
Swig_name_register((String_or_char *) "construct", (String_or_char *) "%c_allocate");
|
||||
Swig_name_register((const_String_or_char_ptr ) "construct", (const_String_or_char_ptr ) "%c_allocate");
|
||||
|
||||
|
||||
Language::constructorHandler(n);
|
||||
|
|
@ -2601,7 +2601,7 @@ public:
|
|||
Delete(docs);
|
||||
|
||||
current = CONSTRUCTOR_INITIALIZE;
|
||||
Swig_name_register((String_or_char *) "construct", (String_or_char *) "new_%c");
|
||||
Swig_name_register((const_String_or_char_ptr ) "construct", (const_String_or_char_ptr ) "new_%c");
|
||||
Language::constructorHandler(n);
|
||||
|
||||
/* Restore original parameter list */
|
||||
|
|
@ -2609,7 +2609,7 @@ public:
|
|||
Swig_restore(n);
|
||||
|
||||
/* Done */
|
||||
Swig_name_unregister((String_or_char *) "construct");
|
||||
Swig_name_unregister((const_String_or_char_ptr ) "construct");
|
||||
current = NO_CPP;
|
||||
klass->constructor_defined = 1;
|
||||
return SWIG_OK;
|
||||
|
|
@ -2623,7 +2623,7 @@ public:
|
|||
|
||||
/* First wrap the allocate method */
|
||||
current = CONSTRUCTOR_ALLOCATE;
|
||||
Swig_name_register((String_or_char *) "construct", (String_or_char *) "%c_allocate");
|
||||
Swig_name_register((const_String_or_char_ptr ) "construct", (const_String_or_char_ptr ) "%c_allocate");
|
||||
|
||||
return Language::copyconstructorHandler(n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ int SWIG_main(int, char **, Language *);
|
|||
void emit_parameter_variables(ParmList *l, Wrapper *f);
|
||||
void emit_return_variable(Node *n, SwigType *rt, Wrapper *f);
|
||||
void SWIG_exit(int); /* use EXIT_{SUCCESS,FAILURE} */
|
||||
void SWIG_config_file(const String_or_char *);
|
||||
void SWIG_config_file(const_String_or_char_ptr );
|
||||
const String *SWIG_output_directory();
|
||||
void SWIG_config_cppext(const char *ext);
|
||||
|
||||
|
|
@ -329,17 +329,17 @@ void emit_mark_varargs(ParmList *l);
|
|||
String *emit_action(Node *n);
|
||||
int emit_action_code(Node *n, String *wrappercode, String *action);
|
||||
void Swig_overload_check(Node *n);
|
||||
String *Swig_overload_dispatch(Node *n, const String_or_char *fmt, int *);
|
||||
String *Swig_overload_dispatch_cast(Node *n, const String_or_char *fmt, int *);
|
||||
String *Swig_overload_dispatch_fast(Node *n, const String_or_char *fmt, int *);
|
||||
String *Swig_overload_dispatch(Node *n, const_String_or_char_ptr fmt, int *);
|
||||
String *Swig_overload_dispatch_cast(Node *n, const_String_or_char_ptr fmt, int *);
|
||||
String *Swig_overload_dispatch_fast(Node *n, const_String_or_char_ptr fmt, int *);
|
||||
SwigType *cplus_value_type(SwigType *t);
|
||||
|
||||
/* directors.cxx start */
|
||||
String *Swig_csuperclass_call(String *base, String *method, ParmList *l);
|
||||
String *Swig_class_declaration(Node *n, String *name);
|
||||
String *Swig_class_name(Node *n);
|
||||
String *Swig_method_call(String_or_char *name, ParmList *parms);
|
||||
String *Swig_method_decl(SwigType *rtype, SwigType *decl, const String_or_char *id, List *args, int strip, int values);
|
||||
String *Swig_method_call(const_String_or_char_ptr name, ParmList *parms);
|
||||
String *Swig_method_decl(SwigType *rtype, SwigType *decl, const_String_or_char_ptr id, List *args, int strip, int values);
|
||||
String *Swig_director_declaration(Node *n);
|
||||
void Swig_director_emit_dynamic_cast(Node *n, Wrapper *f);
|
||||
/* directors.cxx end */
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static void add_defined_foreign_type(String *type) {
|
|||
}
|
||||
|
||||
|
||||
static String *get_ffi_type(SwigType *ty, const String_or_char *name) {
|
||||
static String *get_ffi_type(SwigType *ty, const_String_or_char_ptr name) {
|
||||
Hash *typemap = Swig_typemap_search("ffitype", ty, name, 0);
|
||||
if (typemap) {
|
||||
String *typespec = Getattr(typemap, "code");
|
||||
|
|
@ -167,7 +167,7 @@ static String *get_ffi_type(SwigType *ty, const String_or_char *name) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static String *get_lisp_type(SwigType *ty, const String_or_char *name) {
|
||||
static String *get_lisp_type(SwigType *ty, const_String_or_char_ptr name) {
|
||||
Hash *typemap = Swig_typemap_search("lisptype", ty, name, 0);
|
||||
if (typemap) {
|
||||
String *typespec = Getattr(typemap, "code");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue