From 8d127d3061c2f2e66772a312c76e27f28d41450e Mon Sep 17 00:00:00 2001 From: Nishant Gupta Date: Thu, 4 Aug 2016 12:37:07 +0530 Subject: Fix: Header file not found and include passing tests --- Examples/test-suite/hhvm/Makefile.in | 12 ------------ Examples/test-suite/hhvm/config.cmake | 2 ++ Examples/test-suite/import_nomodule.i | 2 +- Source/Modules/hhvm.cxx | 10 ++++------ 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Examples/test-suite/hhvm/Makefile.in b/Examples/test-suite/hhvm/Makefile.in index e53e07635..2740d3b55 100644 --- a/Examples/test-suite/hhvm/Makefile.in +++ b/Examples/test-suite/hhvm/Makefile.in @@ -13,13 +13,11 @@ SO = @SO@ FAILING_C_TESTS += \ enums \ - inctest \ nested \ nested_extend_c \ nested_structs \ overload_extend2 \ overload_extend_c \ - preproc_include \ typedef_struct \ typemap_subst \ @@ -51,7 +49,6 @@ FAILING_CPP_TESTS = \ friends_template \ ignore_parameter \ ignore_template_constructor \ - import_nomodule \ kwargs_feature \ li_boost_shared_ptr \ li_boost_shared_ptr_bits \ @@ -89,10 +86,6 @@ FAILING_CPP_TESTS = \ primitive_ref \ redefined \ refcount \ - rename1 \ - rename2 \ - rename3 \ - rename4 \ rename_scope \ return_const_value \ sizet \ @@ -108,13 +101,11 @@ FAILING_CPP_TESTS = \ smart_pointer_namespace \ smart_pointer_namespace2 \ smart_pointer_overload \ - smart_pointer_protected \ smart_pointer_rename \ smart_pointer_simple \ smart_pointer_template_const_overload \ smart_pointer_template_defaults_overload \ smart_pointer_templatemethods \ - smart_pointer_templatevariables \ smart_pointer_typedef \ special_variable_macros \ special_variables \ @@ -128,9 +119,6 @@ FAILING_CPP_TESTS = \ template_ns \ template_opaque \ template_type_namespace \ - template_typedef_cplx2 \ - template_typedef_cplx3 \ - template_typedef_cplx4 \ template_typedef_fnc \ typemap_namespace \ typemap_out_optimal \ diff --git a/Examples/test-suite/hhvm/config.cmake b/Examples/test-suite/hhvm/config.cmake index 07c5ae95c..c52b77021 100644 --- a/Examples/test-suite/hhvm/config.cmake +++ b/Examples/test-suite/hhvm/config.cmake @@ -1,4 +1,6 @@ file(GLOB ext_SRC "*.cxx" "*.cpp" "*.c") +include_directories(../../) + HHVM_EXTENSION($testcase ${ext_SRC}) HHVM_SYSTEMLIB($testcase ../ext_$testcase.php) diff --git a/Examples/test-suite/import_nomodule.i b/Examples/test-suite/import_nomodule.i index 60ef7e0f6..ad64bd7b0 100644 --- a/Examples/test-suite/import_nomodule.i +++ b/Examples/test-suite/import_nomodule.i @@ -8,7 +8,7 @@ %import "import_nomodule.h" -#if !defined(SWIGJAVA) && !defined(SWIGRUBY) && !defined(SWIGCSHARP) && !defined(SWIGD) && !defined(SWIGPYTHON_BUILTIN) +#if !defined(SWIGJAVA) && !defined(SWIGRUBY) && !defined(SWIGCSHARP) && !defined(SWIGD) && !defined(SWIGPYTHON_BUILTIN) && !defined(SWIGHHVM) /** * The proxy class does not have Bar derived from Foo, yet an instance of Bar diff --git a/Source/Modules/hhvm.cxx b/Source/Modules/hhvm.cxx index df97cddc5..09f31b2c7 100644 --- a/Source/Modules/hhvm.cxx +++ b/Source/Modules/hhvm.cxx @@ -930,16 +930,14 @@ public: virtual int membervariableHandler(Node *n) { String *varname = Getattr(n, "sym:name"); String *wname, *tm; - String *classname = GetChar(Swig_methodclass(n), "sym:name"); - String *wclassname = GetChar(Swig_methodclass(n), "wrap:name"); String *out_str = NewStringf(" { \"%s\", ", varname); Language::membervariableHandler(n); if ((wname = Getattr(class_get_vars, varname))) { - String *accname = NewStringf("SWIG_get_%s_%s", classname, varname); + String *accname = NewStringf("SWIG%s", wname); Printf(f_link, "static Variant %s(const Object& this_) {\n", accname); - Printf(f_link, " auto data = Object(this_);\n", wclassname); + Printf(f_link, " auto data = Object(this_);\n"); Printf(f_link, " return Variant(%s(data));\n", wname); Printf(f_link, "}\n\n"); Printf(out_str, "%s, ", accname); @@ -948,9 +946,9 @@ public: } if ((wname = Getattr(class_set_vars, varname))) { - String *accname = NewStringf("SWIG_set_%s_%s", classname, varname); + String *accname = NewStringf("SWIG%s", wname); Printf(f_link, "static void %s(const Object& this_, HHVM_PROP_CONST Variant& value) {\n", accname); - Printf(f_link, " auto data = Object(this_);\n", wclassname); + Printf(f_link, " auto data = Object(this_);\n"); if ((tm = Swig_typemap_lookup("variant_out", n, varname, 0))) { Printf(f_link, " %s(data, value.%s());\n", wname, tm); } -- cgit v1.2.1