Fix comments and newlines within operator definitions
Fix handling of conversion operators where the operator is split over multiple lines or has comments within the operator type. Also fix similar problem with normal operators which gave a syntax error if split over multiple lines or had a comment within the operator declaration. Closes #401
This commit is contained in:
parent
0fad8a3728
commit
cf29b90a2b
5 changed files with 78 additions and 1 deletions
|
|
@ -12,6 +12,10 @@
|
|||
%rename(PlusPlusPostfix) operator++(int);
|
||||
#endif
|
||||
|
||||
%ignore operator new (size_t);
|
||||
%ignore operator delete (void *);
|
||||
%ignore operator delete[] (void *);
|
||||
|
||||
%{
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
|
@ -58,6 +62,11 @@ public:
|
|||
void PrintK() {std::cerr << k << std::endl;}
|
||||
|
||||
int k;
|
||||
void *operator new
|
||||
(size_t); // definition split over two lines was giving syntax error
|
||||
void operator delete /* comment here did not work */ (void *);
|
||||
void operator
|
||||
delete[] (void *);
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue