Minor fixes and cleanup

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@467 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-06-15 03:23:47 +00:00
commit 64ddf38c9a
5 changed files with 19 additions and 15 deletions

View file

@ -1,5 +1,7 @@
/* Include the proper SWIG core header */
/* Feel free to change this when compiling against experiment cores */
extern "C" {
#include "doh.h"
}
#include "swig11.h"

View file

@ -13,7 +13,9 @@
* ----------------------------------------------------------------------------- */
#include "internal.h"
extern "C" {
#include "doh.h"
}
static char cvsroot[] = "$Header$";

View file

@ -81,9 +81,9 @@ char *name_wrapper(char *fname, char *prefix, int suppress) {
static String fmt;
char *f;
f = name_getformat("wrapper");
f = name_getformat((char*)"wrapper");
if (!f) {
f = "_wrap_%p%f"; // Default wrapper name
f = (char*)"_wrap_%p%f"; // Default wrapper name
}
fmt = f;
fmt.replace("%f",fname);
@ -112,9 +112,9 @@ char *name_member(char *fname, char *classname, int suppress) {
static String fmt;
char *f;
f = name_getformat("member");
f = name_getformat((char*)"member");
if (!f) {
f = "%c_%f";
f = (char*)"%c_%f";
}
fmt = f;
fmt.replace("%f",fname);
@ -139,9 +139,9 @@ char *name_get(char *vname, int suppress) {
static String fmt;
char *f;
f = name_getformat("get");
f = name_getformat((char*)"get");
if (!f) {
f = "%v_get";
f = (char*)"%v_get";
}
fmt = f;
fmt.replace("%v",vname);
@ -162,9 +162,9 @@ char *name_set(char *vname, int suppress) {
static String fmt;
char *f;
f = name_getformat("set");
f = name_getformat((char*)"set");
if (!f) {
f = "%v_set";
f = (char*)"%v_set";
}
fmt = f;
fmt.replace("%v",vname);
@ -189,9 +189,9 @@ char *name_construct(char *classname, int suppress) {
static String fmt;
char *f;
f = name_getformat("construct");
f = name_getformat((char*)"construct");
if (!f) {
f = "new_%c";
f = (char*)"new_%c";
}
fmt = f;
fmt.replace("%l",typemap_lang);
@ -217,9 +217,9 @@ char *name_destroy(char *classname, int suppress) {
static String fmt;
char *f;
f = name_getformat("destroy");
f = name_getformat((char*)"destroy");
if (!f) {
f = "delete_%c";
f = (char*)"delete_%c";
}
fmt = f;
fmt.replace("%l",typemap_lang);

View file

@ -31,7 +31,7 @@ void
Swig_add_directory(const DOHString_or_char *dirname) {
if (!directories) directories = NewList();
assert(directories);
if (!String_check(dirname)) {
if (!DohIsString(dirname)) {
dirname = NewString((char *) dirname);
assert(dirname);
}

View file

@ -100,7 +100,7 @@ SwigScanner_push(SwigScanner *s, DOHString *txt) {
Push(s->scanobjs,txt);
if (s->str) Delete(s->str);
s->str = txt;
Incref(s->str);
DohIncref(s->str);
s->line = Getline(txt);
}
@ -181,7 +181,7 @@ nextchar(SwigScanner *s)
s->str = Getitem(s->scanobjs,0);
if (s->str) {
s->line = Getline(s->str);
Incref(s->str);
DohIncref(s->str);
}
}
if (nc == '\n') s->line++;