Changes to compile with VC++6

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-11-10 21:10:17 +00:00
commit 39abd80eef
4 changed files with 18 additions and 14 deletions

View file

@ -826,9 +826,9 @@ void CFFI::emit_struct_union(Node *n, bool un = false) {
Printf(f_cl, ")\n");
emit_export(n, lisp_name);
for (Node *c = firstChild(n); c; c = nextSibling(c)) {
if (!Strcmp(nodeType(c), "cdecl")) {
emit_export(c, lispify_name(c, Getattr(c, "sym:name"), "'slotname"));
for (Node *child = firstChild(n); child; child = nextSibling(child)) {
if (!Strcmp(nodeType(child), "cdecl")) {
emit_export(child, lispify_name(child, Getattr(child, "sym:name"), "'slotname"));
}
}

View file

@ -1587,7 +1587,8 @@ public:
// put this in classDirectorEnd ???
Printf(proxy_class_code, " private void SwigDirectorConnect() {\n");
for (int i = first_class_dmethod; i < curr_class_dmethod; ++i) {
int i;
for (i = first_class_dmethod; i < curr_class_dmethod; ++i) {
UpcallData *udata = Getitem(dmethods_seq, i);
String *method = Getattr(udata, "method");
String *methid = Getattr(udata, "class_methodidx");
@ -1596,7 +1597,7 @@ public:
Printf(proxy_class_code, " swigDelegate%s = new SwigDelegate%s_%s(SwigDirector%s);\n", methid, proxy_class_name, methid, overname);
}
Printf(proxy_class_code, " %s.%s_director_connect(swigCPtr", imclass_name, proxy_class_name);
for (int i = first_class_dmethod; i < curr_class_dmethod; ++i) {
for (i = first_class_dmethod; i < curr_class_dmethod; ++i) {
UpcallData *udata = Getitem(dmethods_seq, i);
String *methid = Getattr(udata, "class_methodidx");
Printf(proxy_class_code, ", swigDelegate%s", methid);
@ -3756,6 +3757,7 @@ public:
* ------------------------------------------------------------ */
int classDirectorEnd(Node *n) {
int i;
String *director_classname = directorClassName(n);
Wrapper *w = NewWrapper();
@ -3768,7 +3770,7 @@ public:
Printf(w->def, "void %s::swig_connect_director(", director_classname);
for (int i = first_class_dmethod; i < curr_class_dmethod; ++i) {
for (i = first_class_dmethod; i < curr_class_dmethod; ++i) {
UpcallData *udata = Getitem(dmethods_seq, i);
String *methid = Getattr(udata, "class_methodidx");
String *overname = Getattr(udata, "overname");
@ -3794,7 +3796,7 @@ public:
Printf(w->code, "}\n\n");
Printf(w->code, "void %s::swig_init_callbacks() {\n", director_classname);
for (int i = first_class_dmethod; i < curr_class_dmethod; ++i) {
for (i = first_class_dmethod; i < curr_class_dmethod; ++i) {
UpcallData *udata = Getitem(dmethods_seq, i);
String *overname = Getattr(udata, "overname");
Printf(w->code, "swig_callback%s = 0;\n", overname);

View file

@ -945,7 +945,8 @@ public:
int newobject = GetFlag(n, "feature:new");
Parm *p;
int i, numopt;
int i;
int numopt;
String *tm;
Wrapper *f;
bool mvr = (shadow && php_version == 4 && wrapperType == membervar);
@ -1414,7 +1415,7 @@ public:
fprintf(stderr, "Malloc failed!\n");
exit(1);
}
for (int i = 0; i < max_num_of_arguments; ++i) {
for (i = 0; i < max_num_of_arguments; ++i) {
arg_names[i] = NULL;
}
@ -1425,7 +1426,7 @@ public:
fprintf(stderr, "Malloc failed!\n");
exit(1);
}
for (int i = 0; i < max_num_of_arguments; ++i) {
for (i = 0; i < max_num_of_arguments; ++i) {
arg_values[i] = NULL;
}

View file

@ -20,7 +20,8 @@ static const int MAX_OVERLOAD_ARGS = 5;
static String * getRTypeName(SwigType *t, int *outCount = NULL) {
String *b = SwigType_base(t);
List *els = SwigType_split(t);
int count = 0, i;
int count = 0;
int i;
if(Strncmp(b, "struct ", 7) == 0)
Replace(b, "struct ", "", DOH_REPLACE_FIRST);
@ -519,7 +520,7 @@ int R::getFunctionPointerNumArgs(Node *n, SwigType *tt) {
n = SwigType_typedef_resolve(tt);
#endif
ParmList *parms(Getattr(n, "parms"));
ParmList *parms = Getattr(n, "parms");
if (debugMode)
Printf(stderr, "parms = %p\n", parms);
return ParmList_len(parms);
@ -635,7 +636,7 @@ String * R::createFunctionPointerHandler(SwigType *t, Node *n, int *numArgs) {
String *setExprElements = NewString("");
String *s_paramTypes = NewString("");
for(int i = 0; p; i++) {
for(i = 0; p; i++) {
SwigType *tt = Getattr(p, "type");
SwigType *name = Getattr(p, "name");
// String *lname = Getattr(p,"lname");
@ -2900,7 +2901,7 @@ int R::typedefHandler(Node *n) {
it is for a field element.
**********************/
int R::membervariableHandler(Node *n) {
SwigType *t(Getattr(n, "type"));
SwigType *t = Getattr(n, "type");
processType(t, n, NULL);
processing_member_access_function = 1;
member_name = Getattr(n,"sym:name");