Remove support for $source and $target
These were officially deprecated in 2001, and attempts to use them have resulted in a warning (including a pointer to what to update them to) for most if not all of that time. Fixes #1984
This commit is contained in:
parent
5f8768daed
commit
9ddc9dceb7
27 changed files with 21 additions and 279 deletions
|
|
@ -634,7 +634,6 @@ String * R::createFunctionPointerHandler(SwigType *t, Node *n, int *numArgs) {
|
|||
if(returnTM) {
|
||||
String *tm = returnTM;
|
||||
Replaceall(tm,"$input", "r_swig_cb_data->retValue");
|
||||
Replaceall(tm,"$target", Swig_cresult_name());
|
||||
replaceRClass(tm, rettype);
|
||||
Replaceall(tm,"$owner", "0");
|
||||
Replaceall(tm,"$disown","0");
|
||||
|
|
@ -1912,8 +1911,6 @@ int R::functionWrapper(Node *n) {
|
|||
|
||||
if ((tm = Getattr(p,"tmap:scheck"))) {
|
||||
|
||||
Replaceall(tm,"$target", lname);
|
||||
Replaceall(tm,"$source", name);
|
||||
Replaceall(tm,"$input", name);
|
||||
replaceRClass(tm, Getattr(p, "type"));
|
||||
Printf(sfun->code,"%s\n",tm);
|
||||
|
|
@ -1924,8 +1921,6 @@ int R::functionWrapper(Node *n) {
|
|||
curP = p;
|
||||
if ((tm = Getattr(p,"tmap:in"))) {
|
||||
|
||||
Replaceall(tm,"$target", lname);
|
||||
Replaceall(tm,"$source", name);
|
||||
Replaceall(tm,"$input", name);
|
||||
|
||||
if (Getattr(p,"wrap:disown") || (Getattr(p,"tmap:in:disown"))) {
|
||||
|
|
@ -1984,7 +1979,6 @@ int R::functionWrapper(Node *n) {
|
|||
String *cleanup = NewString("");
|
||||
for (p = l; p;) {
|
||||
if ((tm = Getattr(p, "tmap:freearg"))) {
|
||||
Replaceall(tm, "$source", Getattr(p, "lname"));
|
||||
if (tm && (Len(tm) != 0)) {
|
||||
Printv(cleanup, tm, "\n", NIL);
|
||||
}
|
||||
|
|
@ -2001,7 +1995,6 @@ int R::functionWrapper(Node *n) {
|
|||
// String *lname = Getattr(p, "lname");
|
||||
numOutArgs++;
|
||||
String *pos = NewStringf("%d", numOutArgs);
|
||||
Replaceall(tm,"$source", Getattr(p, "lname"));
|
||||
Replaceall(tm,"$result", "r_ans");
|
||||
Replaceall(tm,"$n", pos); // The position into which to store the answer.
|
||||
Replaceall(tm,"$arg", Getattr(p, "emit:input"));
|
||||
|
|
@ -2076,14 +2069,12 @@ int R::functionWrapper(Node *n) {
|
|||
/* Look to see if there is any newfree cleanup code */
|
||||
if (GetFlag(n, "feature:new")) {
|
||||
if ((tm = Swig_typemap_lookup("newfree", n, Swig_cresult_name(), 0))) {
|
||||
Replaceall(tm, "$source", Swig_cresult_name()); /* deprecated */
|
||||
Printf(f->code, "%s\n", tm);
|
||||
}
|
||||
}
|
||||
|
||||
/* See if there is any return cleanup code */
|
||||
if ((tm = Swig_typemap_lookup("ret", n, Swig_cresult_name(), 0))) {
|
||||
Replaceall(tm, "$source", Swig_cresult_name());
|
||||
Printf(f->code, "%s\n", tm);
|
||||
Delete(tm);
|
||||
}
|
||||
|
|
@ -2092,7 +2083,6 @@ int R::functionWrapper(Node *n) {
|
|||
|
||||
/*If the user gave us something to convert the result in */
|
||||
if ((tm = Swig_typemap_lookup("scoerceout", n, Swig_cresult_name(), sfun))) {
|
||||
Replaceall(tm,"$source","ans");
|
||||
Replaceall(tm,"$result","ans");
|
||||
if (constructor) {
|
||||
Node * parent = Getattr(n, "parentNode");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue