Set wrap:name for variables for use in special variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9c5610a8e9
commit
2bef4d6b0c
8 changed files with 14 additions and 0 deletions
|
|
@ -709,6 +709,8 @@ int CHICKEN::variableWrapper(Node *n) {
|
|||
if (overname) {
|
||||
Append(wname, overname);
|
||||
}
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
// Check for interrupts
|
||||
Printv(f->code, "C_trace(\"", scmname, "\");\n", NIL);
|
||||
|
||||
|
|
@ -907,6 +909,7 @@ int CHICKEN::constantWrapper(Node *n) {
|
|||
|
||||
if (1 || (SwigType_type(t) != T_USER) || (isPointer(t))) {
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
Printv(f->def, "static ", "void ", wname, "(C_word, C_word, C_word) C_noret;\n", NIL);
|
||||
|
||||
Printv(f->def, "static ", "void ", wname, "(C_word argc, C_word closure, " "C_word continuation) {\n", NIL);
|
||||
|
|
|
|||
|
|
@ -1162,6 +1162,7 @@ public:
|
|||
// Build the name for scheme.
|
||||
proc_name = NewString(iname);
|
||||
Replaceall(proc_name, "_", "-");
|
||||
Setattr(n, "wrap:name", proc_name);
|
||||
|
||||
if (1 || (SwigType_type(t) != T_USER) || (is_a_pointer(t))) {
|
||||
|
||||
|
|
|
|||
|
|
@ -522,6 +522,7 @@ public:
|
|||
// Build the name for scheme.
|
||||
Printv(proc_name, iname, NIL);
|
||||
Replaceall(proc_name, "_", "-");
|
||||
Setattr(n, "wrap:name", proc_name);
|
||||
|
||||
if ((SwigType_type(t) != T_USER) || (is_a_pointer(t))) {
|
||||
|
||||
|
|
|
|||
|
|
@ -795,6 +795,7 @@ public:
|
|||
|
||||
// Build the name for scheme.
|
||||
Printv(proc_name, iname, NIL);
|
||||
Setattr(n, "wrap:name", proc_name);
|
||||
|
||||
Printf(f->def, "SWIGEXT CAML_VALUE %s(CAML_VALUE args) {\n", var_name);
|
||||
// Printv(f->def, "#define FUNC_NAME \"", proc_name, "\"", NIL);
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@ public:
|
|||
/* Create a Perl function for setting the variable value */
|
||||
|
||||
if (!GetFlag(n, "feature:immutable")) {
|
||||
Setattr(n, "wrap:name", set_name);
|
||||
Printf(setf->def, "SWIGCLASS_STATIC int %s(pTHX_ SV* sv, MAGIC * SWIGUNUSEDPARM(mg)) {\n", set_name);
|
||||
Printv(setf->code, tab4, "MAGIC_PPERL\n", NIL);
|
||||
|
||||
|
|
@ -804,6 +805,7 @@ public:
|
|||
}
|
||||
|
||||
/* Now write a function to evaluate the variable */
|
||||
Setattr(n, "wrap:name", get_name);
|
||||
int addfail = 0;
|
||||
Printf(getf->def, "SWIGCLASS_STATIC int %s(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) {\n", get_name);
|
||||
Printv(getf->code, tab4, "MAGIC_PPERL\n", NIL);
|
||||
|
|
|
|||
|
|
@ -2178,6 +2178,7 @@ public:
|
|||
|
||||
/* Create a function for setting the value of the variable */
|
||||
if (assignable) {
|
||||
Setattr(n, "wrap:name", varsetname);
|
||||
Printf(setf->def, "SWIGINTERN int %s(PyObject *_val) {", varsetname);
|
||||
if ((tm = Swig_typemap_lookup_new("varin", n, name, 0))) {
|
||||
Replaceall(tm, "$source", "_val");
|
||||
|
|
@ -2208,6 +2209,7 @@ public:
|
|||
Wrapper_print(setf, f_wrappers);
|
||||
|
||||
/* Create a function for getting the value of a variable */
|
||||
Setattr(n, "wrap:name", vargetname);
|
||||
int addfail = 0;
|
||||
Printf(getf->def, "SWIGINTERN PyObject *%s(void) {", vargetname);
|
||||
Wrapper_add_local(getf, "pyobj", "PyObject *pyobj = 0");
|
||||
|
|
|
|||
|
|
@ -2096,6 +2096,7 @@ public:
|
|||
int addfail = 0;
|
||||
String *getname = Swig_name_get(iname);
|
||||
getfname = Swig_name_wrapper(getname);
|
||||
Setattr(n, "wrap:name", getfname);
|
||||
Printv(getf->def, "SWIGINTERN VALUE\n", getfname, "(", NIL);
|
||||
Printf(getf->def, "VALUE self");
|
||||
Printf(getf->def, ") {");
|
||||
|
|
@ -2130,6 +2131,7 @@ public:
|
|||
|
||||
String *setname = Swig_name_set(iname);
|
||||
setfname = Swig_name_wrapper(setname);
|
||||
Setattr(n, "wrap:name", setfname);
|
||||
Printv(setf->def, "SWIGINTERN VALUE\n", setfname, "(VALUE self, ", NIL);
|
||||
Printf(setf->def, "VALUE _val) {");
|
||||
tm = Swig_typemap_lookup_new("varin", n, name, 0);
|
||||
|
|
|
|||
|
|
@ -562,6 +562,7 @@ public:
|
|||
getf = NewWrapper();
|
||||
String *getname = Swig_name_get(iname);
|
||||
String *getfname = Swig_name_wrapper(getname);
|
||||
Setattr(n, "wrap:name", getfname);
|
||||
Printv(getf->def, "SWIGINTERN const char *", getfname, "(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {", NIL);
|
||||
Wrapper_add_local(getf, "value", "Tcl_Obj *value = 0");
|
||||
if ((tm = Swig_typemap_lookup_new("varout", n, name, 0))) {
|
||||
|
|
@ -593,6 +594,7 @@ public:
|
|||
setf = NewWrapper();
|
||||
setname = Swig_name_set(iname);
|
||||
setfname = Swig_name_wrapper(setname);
|
||||
Setattr(n, "wrap:name", setfname);
|
||||
if (setf) {
|
||||
Printv(setf->def, "SWIGINTERN const char *", setfname,
|
||||
"(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2 SWIGUNUSED, int flags) {", NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue