fixes for 'typedef unsigned long size_t'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7939 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a0a055ddb9
commit
28df9d1049
6 changed files with 40 additions and 18 deletions
|
|
@ -16,6 +16,8 @@
|
||||||
char cvsroot_perl5_cxx[] = "$Header$";
|
char cvsroot_perl5_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
|
#include "cparse.h"
|
||||||
|
static int treduce = SWIG_cparse_template_reduce(1);
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
|
@ -128,6 +130,7 @@ public:
|
||||||
int cppcast = 1;
|
int cppcast = 1;
|
||||||
|
|
||||||
SWIG_library_directory("perl5");
|
SWIG_library_directory("perl5");
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (argv[i]) {
|
if (argv[i]) {
|
||||||
if(strcmp(argv[i],"-package") == 0) {
|
if(strcmp(argv[i],"-package") == 0) {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ char cvsroot_python_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
#include "cparse.h"
|
#include "cparse.h"
|
||||||
|
static int treduce = SWIG_cparse_template_reduce(1);
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
|
@ -1461,7 +1462,8 @@ public:
|
||||||
|
|
||||||
/* Insert cleanup code */
|
/* Insert cleanup code */
|
||||||
for (p = l; p;) {
|
for (p = l; p;) {
|
||||||
if (!checkAttribute(p,"tmap:in:numinputs","0") && (tm = Getattr(p,"tmap:freearg"))) {
|
if (!checkAttribute(p,"tmap:in:numinputs","0") &&
|
||||||
|
!Getattr(p,"tmap:in:parse") && (tm = Getattr(p,"tmap:freearg"))) {
|
||||||
if (Len(tm) != 0) {
|
if (Len(tm) != 0) {
|
||||||
Replaceall(tm,"$source",Getattr(p,"lname"));
|
Replaceall(tm,"$source",Getattr(p,"lname"));
|
||||||
Printv(cleanup,tm,"\n",NIL);
|
Printv(cleanup,tm,"\n",NIL);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
char cvsroot_ruby_cxx[] = "$Header$";
|
char cvsroot_ruby_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
|
#include "cparse.h"
|
||||||
|
static int treduce = SWIG_cparse_template_reduce(1);
|
||||||
|
|
||||||
#define SWIG_PROTECTED_TARGET_METHODS 1
|
#define SWIG_PROTECTED_TARGET_METHODS 1
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
char cvsroot_tcl8_cxx[] = "$Header$";
|
char cvsroot_tcl8_cxx[] = "$Header$";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
|
#include "cparse.h"
|
||||||
|
static int treduce = SWIG_cparse_template_reduce(1);
|
||||||
|
|
||||||
static const char *usage = (char*)"\
|
static const char *usage = (char*)"\
|
||||||
Tcl 8 Options (available with -tcl)\n\
|
Tcl 8 Options (available with -tcl)\n\
|
||||||
|
|
@ -418,7 +420,8 @@ public:
|
||||||
|
|
||||||
/* Insert cleanup code */
|
/* Insert cleanup code */
|
||||||
for (i = 0, p = parms; p; i++) {
|
for (i = 0, p = parms; p; i++) {
|
||||||
if (!checkAttribute(p,"tmap:in:numinputs","0") && (tm = Getattr(p,"tmap:freearg"))) {
|
if (!checkAttribute(p,"tmap:in:numinputs","0")
|
||||||
|
&& !Getattr(p,"tmap:in:parse") && (tm = Getattr(p,"tmap:freearg"))) {
|
||||||
if (Len(tm) != 0) {
|
if (Len(tm) != 0) {
|
||||||
Replaceall(tm,"$source",Getattr(p,"lname"));
|
Replaceall(tm,"$source",Getattr(p,"lname"));
|
||||||
Printv(cleanup,tm,"\n",NIL);
|
Printv(cleanup,tm,"\n",NIL);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ Swig_fragment_register(Node* fragment) {
|
||||||
String *type = Getattr(fragment,"type");
|
String *type = Getattr(fragment,"type");
|
||||||
if (type) {
|
if (type) {
|
||||||
SwigType *rtype = SwigType_typedef_resolve_all(type);
|
SwigType *rtype = SwigType_typedef_resolve_all(type);
|
||||||
String *mangle = Swig_string_mangle(rtype);
|
String *mangle = Swig_string_mangle(type);
|
||||||
Append(name,mangle);
|
Append(name,mangle);
|
||||||
Delete(mangle);
|
Delete(mangle);
|
||||||
Delete(rtype);
|
Delete(rtype);
|
||||||
|
|
@ -95,9 +95,7 @@ Swig_fragment_emit(Node *n) {
|
||||||
}
|
}
|
||||||
type = Getattr(n,"type");
|
type = Getattr(n,"type");
|
||||||
if (type) {
|
if (type) {
|
||||||
SwigType *rtype = SwigType_typedef_resolve_all(type);
|
mangle = Swig_string_mangle(type);
|
||||||
mangle = Swig_string_mangle(rtype);
|
|
||||||
Delete(rtype);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug) Printf(stdout,"looking fragment %s %s\n",name, type);
|
if (debug) Printf(stdout,"looking fragment %s %s\n",name, type);
|
||||||
|
|
@ -133,7 +131,19 @@ Swig_fragment_emit(Node *n) {
|
||||||
Setattr(fragments,name,"ignore");
|
Setattr(fragments,name,"ignore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (code && type) {
|
||||||
|
SwigType *rtype = SwigType_typedef_resolve_all(type);
|
||||||
|
if (!Equal(type,rtype)) {
|
||||||
|
String *name = Copy(Getattr(n,"value"));
|
||||||
|
Append(name,rtype);
|
||||||
|
Swig_fragment_emit(name);
|
||||||
|
Delete(name);
|
||||||
|
}
|
||||||
|
Delete(rtype);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tok = pc ? pc + 1 : 0;
|
tok = pc ? pc + 1 : 0;
|
||||||
if (tok) {
|
if (tok) {
|
||||||
pc = char_index(tok,',');
|
pc = char_index(tok,',');
|
||||||
|
|
|
||||||
|
|
@ -1230,6 +1230,7 @@ String *Swig_typemap_lookup_new(const String_or_char *op, Node *node, const Stri
|
||||||
String *symname;
|
String *symname;
|
||||||
String *cname = 0;
|
String *cname = 0;
|
||||||
String *clname = 0;
|
String *clname = 0;
|
||||||
|
char *cop = Char(op);
|
||||||
#if 0
|
#if 0
|
||||||
String *qsn;
|
String *qsn;
|
||||||
Symtab *st;
|
Symtab *st;
|
||||||
|
|
@ -1330,13 +1331,13 @@ Printf(stdout, "Swig_typemap_lookup %s [%s %s]\n", op, type, pname ? pname : "NO
|
||||||
|
|
||||||
Setattr(node,tmop_name(op),s);
|
Setattr(node,tmop_name(op),s);
|
||||||
if (locals) {
|
if (locals) {
|
||||||
sprintf(temp,"%s:locals", Char(op));
|
sprintf(temp,"%s:locals", cop);
|
||||||
Setattr(node,tmop_name(temp), locals);
|
Setattr(node,tmop_name(temp), locals);
|
||||||
Delete(locals);
|
Delete(locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HashCheckAttr(tm,k_type,k_SWIGTYPE)) {
|
if (HashCheckAttr(tm,k_type,k_SWIGTYPE)) {
|
||||||
sprintf(temp,"%s:SWIGTYPE", Char(op));
|
sprintf(temp,"%s:SWIGTYPE", cop);
|
||||||
Setattr(node,tmop_name(temp),k_one);
|
Setattr(node,tmop_name(temp),k_one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1345,14 +1346,13 @@ Printf(stdout, "Swig_typemap_lookup %s [%s %s]\n", op, type, pname ? pname : "NO
|
||||||
while (kw) {
|
while (kw) {
|
||||||
String *value = Copy(Getattr(kw,k_value));
|
String *value = Copy(Getattr(kw,k_value));
|
||||||
String *type = Getattr(kw,k_type);
|
String *type = Getattr(kw,k_type);
|
||||||
if (type) {
|
char *ckwname = Char(Getattr(kw,k_name));
|
||||||
SwigType *rtype = SwigType_typedef_resolve_all(type);
|
if (type) {
|
||||||
String *mangle = Swig_string_mangle(rtype);
|
String *mangle = Swig_string_mangle(type);
|
||||||
StringAppend(value,mangle);
|
StringAppend(value,mangle);
|
||||||
Delete(mangle);
|
Delete(mangle);
|
||||||
Delete(rtype);
|
|
||||||
}
|
}
|
||||||
sprintf(temp,"%s:%s",Char(op),Char(Getattr(kw,k_name)));
|
sprintf(temp,"%s:%s",cop, ckwname);
|
||||||
Setattr(node,tmop_name(temp), value);
|
Setattr(node,tmop_name(temp), value);
|
||||||
Delete(value);
|
Delete(value);
|
||||||
kw = nextSibling(kw);
|
kw = nextSibling(kw);
|
||||||
|
|
@ -1361,7 +1361,7 @@ Printf(stdout, "Swig_typemap_lookup %s [%s %s]\n", op, type, pname ? pname : "NO
|
||||||
/* Look for warnings */
|
/* Look for warnings */
|
||||||
{
|
{
|
||||||
String *w;
|
String *w;
|
||||||
sprintf(temp,"%s:warning", Char(op));
|
sprintf(temp,"%s:warning", cop);
|
||||||
w = Getattr(node,tmop_name(temp));
|
w = Getattr(node,tmop_name(temp));
|
||||||
if (w) {
|
if (w) {
|
||||||
Swig_warning(0,Getfile(node),Getline(node),"%s\n", w);
|
Swig_warning(0,Getfile(node),Getline(node),"%s\n", w);
|
||||||
|
|
@ -1371,7 +1371,7 @@ Printf(stdout, "Swig_typemap_lookup %s [%s %s]\n", op, type, pname ? pname : "NO
|
||||||
/* Look for code fragments */
|
/* Look for code fragments */
|
||||||
{
|
{
|
||||||
String *f;
|
String *f;
|
||||||
sprintf(temp,"%s:fragment", Char(op));
|
sprintf(temp,"%s:fragment", cop);
|
||||||
f = Getattr(node,tmop_name(temp));
|
f = Getattr(node,tmop_name(temp));
|
||||||
if (f) {
|
if (f) {
|
||||||
Swig_fragment_emit(f);
|
Swig_fragment_emit(f);
|
||||||
|
|
@ -1468,6 +1468,7 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
|
||||||
ParmList *locals;
|
ParmList *locals;
|
||||||
int argnum = 0;
|
int argnum = 0;
|
||||||
char temp[256];
|
char temp[256];
|
||||||
|
char *cop = Char(op);
|
||||||
|
|
||||||
p = parms;
|
p = parms;
|
||||||
while (p) {
|
while (p) {
|
||||||
|
|
@ -1513,7 +1514,7 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HashCheckAttr(tm,k_type,k_SWIGTYPE)) {
|
if (HashCheckAttr(tm,k_type,k_SWIGTYPE)) {
|
||||||
sprintf(temp,"%s:SWIGTYPE", Char(op));
|
sprintf(temp,"%s:SWIGTYPE", cop);
|
||||||
Setattr(p,tmop_name(temp),k_one);
|
Setattr(p,tmop_name(temp),k_one);
|
||||||
}
|
}
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
|
|
@ -1533,13 +1534,13 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
|
||||||
Setattr(firstp,tmop_name(op),s); /* Code object */
|
Setattr(firstp,tmop_name(op),s); /* Code object */
|
||||||
|
|
||||||
if (locals) {
|
if (locals) {
|
||||||
sprintf(temp,"%s:locals", Char(op));
|
sprintf(temp,"%s:locals", cop);
|
||||||
Setattr(firstp,tmop_name(temp), locals);
|
Setattr(firstp,tmop_name(temp), locals);
|
||||||
Delete(locals);
|
Delete(locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attach a link to the next parameter. Needed for multimaps */
|
/* Attach a link to the next parameter. Needed for multimaps */
|
||||||
sprintf(temp,"%s:next",Char(op));
|
sprintf(temp,"%s:next",cop);
|
||||||
Setattr(firstp,tmop_name(temp),p);
|
Setattr(firstp,tmop_name(temp),p);
|
||||||
|
|
||||||
/* Attach kwargs */
|
/* Attach kwargs */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue