Improve description of cast macros for Ruby
The macros for casting function pointers are now fully described and also clarify why the macros act transparently for C even before Ruby 2.7. In addition, an "if (CPlusPlus)" was removed in the code generator for global variables in order to keep the distinction between C and C++ in one place, which is at the definition of said macros.
This commit is contained in:
parent
5542cc228a
commit
f5908eca76
2 changed files with 29 additions and 15 deletions
|
|
@ -2270,13 +2270,11 @@ public:
|
|||
Delete(setname);
|
||||
}
|
||||
|
||||
/* define accessor method */
|
||||
if (CPlusPlus) {
|
||||
Insert(getfname, 0, "VALUEFUNC(");
|
||||
Append(getfname, ")");
|
||||
Insert(setfname, 0, (use_virtual_var) ? "SWIG_RUBY_VOID_ANYARGS_FUNC(" : "VALUEFUNC(");
|
||||
Append(setfname, ")");
|
||||
}
|
||||
/* define accessor methods */
|
||||
Insert(getfname, 0, "VALUEFUNC(");
|
||||
Append(getfname, ")");
|
||||
Insert(setfname, 0, (use_virtual_var) ? "SWIG_RUBY_VOID_ANYARGS_FUNC(" : "VALUEFUNC(");
|
||||
Append(setfname, ")");
|
||||
|
||||
String *s = NewString("");
|
||||
switch (current) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue