summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishant Gupta <nish.gupta01@gmail.com>2016-08-02 17:07:18 +0530
committerNishant Gupta <nish.gupta01@gmail.com>2016-08-02 17:07:18 +0530
commite66776d20c204a49b9a80cada7247a43d15853c0 (patch)
treeb0f0a8ef41da5225f19dc43738d663388be650b7
parent5aec1e54b1ca204e1a50ae50754993297e539411 (diff)
downloadswig-e66776d20c204a49b9a80cada7247a43d15853c0.tar.gz
delete testcase
-rw-r--r--Examples/test-suite/c_delete.i2
-rw-r--r--Examples/test-suite/c_delete_function.i2
-rw-r--r--Examples/test-suite/enum_forward.i2
-rw-r--r--Source/Modules/hhvm.cxx2
4 files changed, 5 insertions, 3 deletions
diff --git a/Examples/test-suite/c_delete.i b/Examples/test-suite/c_delete.i
index 0c69f9f41..9f1b9608d 100644
--- a/Examples/test-suite/c_delete.i
+++ b/Examples/test-suite/c_delete.i
@@ -4,7 +4,7 @@
%warnfilter(SWIGWARN_PARSE_KEYWORD) delete;
-#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8) /* Octave and Javascript/v8 compiles wrappers as C++ */
+#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8) && !defined(SWIGHHVM) /* Octave, Javascript/v8 and HHVM compile wrappers as C++ */
%inline %{
struct delete {
diff --git a/Examples/test-suite/c_delete_function.i b/Examples/test-suite/c_delete_function.i
index 8164d066b..144e79dc6 100644
--- a/Examples/test-suite/c_delete_function.i
+++ b/Examples/test-suite/c_delete_function.i
@@ -4,7 +4,7 @@
%warnfilter(SWIGWARN_PARSE_KEYWORD) delete;
-#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8) /* Octave and Javascript/v8 compiles wrappers as C++ */
+#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8) && !defined(SWIGHHVM) /* Octave, Javascript/v8 and HHVM compile wrappers as C++ */
%inline %{
double delete(double d) { return d; }
diff --git a/Examples/test-suite/enum_forward.i b/Examples/test-suite/enum_forward.i
index 784f4fb02..8f87cad10 100644
--- a/Examples/test-suite/enum_forward.i
+++ b/Examples/test-suite/enum_forward.i
@@ -1,7 +1,7 @@
%module enum_forward
/* This contains C code that is not valid C++03 and Octave, and Javascript(v8) wrappers are always compiled as C++ */
-#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8)
+#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8) && !defined(SWIGHHVM)
%{
enum ForwardEnum1 { AAA, BBB };
enum ForwardEnum2 { CCC, DDD };
diff --git a/Source/Modules/hhvm.cxx b/Source/Modules/hhvm.cxx
index d18b543e9..4ddd7651e 100644
--- a/Source/Modules/hhvm.cxx
+++ b/Source/Modules/hhvm.cxx
@@ -66,6 +66,8 @@ public:
/* Output module initialization code */
Swig_banner(f_begin);
+ Printf(f_runtime, "\n\n#ifndef SWIGHHVM\n#define SWIGHHVM\n#endif\n\n");
+
Printf(f_begin, "\n");
Printf(f_begin, "#include \"hphp/runtime/ext/extension.h\"\n");
Printf(f_begin, "#include \"hphp/runtime/base/execution-context.h\"\n");