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
|
|
@ -74,7 +74,7 @@ static void copy_location(const DOH *s1, DOH *s2) {
|
|||
Setline(s2, Getline((DOH *) s1));
|
||||
}
|
||||
|
||||
static String *cpp_include(String_or_char *fn, int sysfile) {
|
||||
static String *cpp_include(const_String_or_char_ptr fn, int sysfile) {
|
||||
String *s = sysfile ? Swig_include_sys(fn) : Swig_include(fn);
|
||||
if (s && single_include) {
|
||||
String *file = Getfile(s);
|
||||
|
|
@ -261,8 +261,9 @@ void Preprocessor_error_as_warning(int a) {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
String_or_char *Macro_vararg_name(String_or_char *str, String_or_char *line) {
|
||||
String_or_char *argname, *varargname;
|
||||
const_String_or_char_ptr Macro_vararg_name(const_String_or_char_ptr str, const_String_or_char_ptr line) {
|
||||
String *argname;
|
||||
String *varargname;
|
||||
char *s, *dots;
|
||||
|
||||
argname = Copy(str);
|
||||
|
|
@ -288,13 +289,13 @@ String_or_char *Macro_vararg_name(String_or_char *str, String_or_char *line) {
|
|||
return varargname;
|
||||
}
|
||||
|
||||
Hash *Preprocessor_define(const String_or_char *_str, int swigmacro) {
|
||||
Hash *Preprocessor_define(const_String_or_char_ptr _str, int swigmacro) {
|
||||
String *macroname = 0, *argstr = 0, *macrovalue = 0, *file = 0, *s = 0;
|
||||
Hash *macro = 0, *symbols = 0, *m1;
|
||||
List *arglist = 0;
|
||||
int c, line;
|
||||
int varargs = 0;
|
||||
String_or_char *str = (String_or_char *) _str;
|
||||
const_String_or_char_ptr str = (const_String_or_char_ptr ) _str;
|
||||
|
||||
assert(cpp);
|
||||
assert(str);
|
||||
|
|
@ -532,7 +533,7 @@ macro_error:
|
|||
*
|
||||
* Undefines a macro.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
void Preprocessor_undef(const String_or_char *str) {
|
||||
void Preprocessor_undef(const_String_or_char_ptr str) {
|
||||
Hash *symbols;
|
||||
assert(cpp);
|
||||
symbols = Getattr(cpp, kpp_symbols);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue