Permalink
Browse files

Fixes for c_delete and c_delete_function tests

  • Loading branch information...
1 parent 7a8dd4b commit cdefaaf794398655de5e93c4aa9f20fdb01e2283 @wsfulton wsfulton committed Nov 21, 2013
Showing with 13 additions and 0 deletions.
  1. +6 −0 Examples/test-suite/c_delete.i
  2. +4 −0 Examples/test-suite/c_delete_function.i
  3. +3 −0 Lib/csharp/csharpkw.swg
@@ -2,6 +2,10 @@
/* check C++ delete keyword is okay in C wrappers */
+#pragma SWIG nowarn=SWIGWARN_PARSE_KEYWORD
+
+#if !defined(SWIGOCTAVE) /* Octave compiles wrappers as C++ */
+
%inline %{
struct delete {
int delete;
@@ -12,3 +16,5 @@ struct delete {
%inline %{
int delete = 0;
%}
+
+#endif
@@ -2,6 +2,10 @@
/* check C++ delete keyword is okay in C wrappers */
+#if !defined(SWIGOCTAVE) /* Octave compiles wrappers as C++ */
+
%inline %{
double delete(double d) { return d; }
%}
+
+#endif
View
@@ -4,6 +4,8 @@
/* Warnings for C# keywords */
#define CSHARPKW(x) %keywordwarn("'" `x` "' is a C# keyword, renaming to '_" `x` "'",rename="_%s") `x`
+#define CSHARPCLASSKW(x) %keywordwarn("'" `x` "' is a special method name used in the C# wrapper classes, class renamed to '_" `x` "'",%$isclass,rename="_%s") `x`
+
/*
from
http://www.jaggersoft.com/csharp_grammar.html#1.7%20Keywords
@@ -88,6 +90,7 @@ CSHARPKW(void);
CSHARPKW(volatile);
CSHARPKW(while);
+CSHARPCLASSKW(delete);
#undef CSHARPKW

0 comments on commit cdefaaf

Please sign in to comment.