diff -Nru gjs-1.48.0/aclocal.m4 gjs-1.48.2/aclocal.m4 --- gjs-1.48.0/aclocal.m4 2017-03-20 17:35:14.000000000 +0000 +++ gjs-1.48.2/aclocal.m4 2017-04-20 20:27:55.000000000 +0000 @@ -1231,6 +1231,7 @@ m4_include([m4/ax_compiler_flags_cxxflags.m4]) m4_include([m4/ax_compiler_flags_gir.m4]) m4_include([m4/ax_compiler_flags_ldflags.m4]) +m4_include([m4/ax_cxx_compile_stdcxx.m4]) m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([m4/ax_is_release.m4]) m4_include([m4/ax_pkg_check_modules.m4]) diff -Nru gjs-1.48.0/configure gjs-1.48.2/configure --- gjs-1.48.0/configure 2017-03-20 17:35:14.000000000 +0000 +++ gjs-1.48.2/configure 2017-04-20 20:27:56.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gjs 1.48.0. +# Generated by GNU Autoconf 2.69 for gjs 1.48.2. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='gjs' PACKAGE_TARNAME='gjs' -PACKAGE_VERSION='1.48.0' -PACKAGE_STRING='gjs 1.48.0' +PACKAGE_VERSION='1.48.2' +PACKAGE_STRING='gjs 1.48.2' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs' PACKAGE_URL='https://wiki.gnome.org/Projects/Gjs' @@ -686,7 +686,10 @@ INTROSPECTION_SCANNER CODE_COVERAGE_RULES CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_LIBS +CODE_COVERAGE_CXXFLAGS CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS GENHTML LCOV GCOV @@ -1425,7 +1428,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gjs 1.48.0 to adapt to many kinds of systems. +\`configure' configures gjs 1.48.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1495,7 +1498,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gjs 1.48.0:";; + short | recursive ) echo "Configuration of gjs 1.48.2:";; esac cat <<\_ACEOF @@ -1660,7 +1663,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gjs configure 1.48.0 +gjs configure 1.48.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2150,7 +2153,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gjs $as_me 1.48.0, which was +It was created by gjs $as_me 1.48.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3013,7 +3016,7 @@ # Define the identity of the package. PACKAGE='gjs' - VERSION='1.48.0' + VERSION='1.48.2' cat >>confdefs.h <<_ACEOF @@ -3227,7 +3230,7 @@ # $is_release = (.git directory does not exist) - if test -d .git; then : + if test -d ${top_srcdir}/.git; then : ax_is_release=no else ax_is_release=yes @@ -3240,10 +3243,10 @@ -GJS_VERSION=14800 +GJS_VERSION=14802 -$as_echo "#define GJS_VERSION (1 * 100 + 48) * 100 + 0" >>confdefs.h +$as_echo "#define GJS_VERSION (1 * 100 + 48) * 100 + 2" >>confdefs.h GETTEXT_PACKAGE=gjs @@ -4159,7 +4162,7 @@ - ax_cxx_compile_cxx11_required=true + ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4174,56 +4177,290 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - template + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; - struct Base { - virtual void f() {} + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} }; - struct Child : public Base { - virtual void f() override {} + + struct Derived : public Base + { + virtual void f() override {} }; - typedef check> right_angle_brackets; + } - int a; - decltype(a) b; + namespace test_double_right_angle_brackets + { - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + template < typename T > + struct check {}; - auto d = a; - auto l = [](){}; - // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] - struct use_l { use_l() { l(); } }; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + } - template - using member = typename T::member_type; + namespace test_decltype + { - template - void func(...) {} + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - template - void func(member*) {} + } - void test(); + namespace test_type_deduction + { - void test() { - func(0); - } + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; } - // Check for C++11 attribute support - void noret [[noreturn]] () { throw 0; } + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : @@ -4247,61 +4484,295 @@ if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" + ac_save_CXX="$CXX" + CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - template + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; - struct Base { - virtual void f() {} + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} }; - struct Child : public Base { - virtual void f() override {} + + struct Derived : public Base + { + virtual void f() override {} }; - typedef check> right_angle_brackets; + } - int a; - decltype(a) b; + namespace test_double_right_angle_brackets + { - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + template < typename T > + struct check {}; - auto d = a; - auto l = [](){}; - // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] - struct use_l { use_l() { l(); } }; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + } - template - using member = typename T::member_type; + namespace test_decltype + { - template - void func(...) {} + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - template - void func(member*) {} + } - void test(); + namespace test_type_deduction + { - void test() { - func(0); - } + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); } - // Check for C++11 attribute support - void noret [[noreturn]] () { throw 0; } + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : @@ -4310,13 +4781,16 @@ eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="$ac_save_CXXFLAGS" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi ac_success=yes break fi @@ -4331,61 +4805,295 @@ if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" + ac_save_CXX="$CXX" + CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - template + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; - struct Base { - virtual void f() {} + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} }; - struct Child : public Base { - virtual void f() override {} + + struct Derived : public Base + { + virtual void f() override {} }; - typedef check> right_angle_brackets; + } - int a; - decltype(a) b; + namespace test_double_right_angle_brackets + { - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + template < typename T > + struct check {}; - auto d = a; - auto l = [](){}; - // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] - struct use_l { use_l() { l(); } }; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + } - template - using member = typename T::member_type; + namespace test_decltype + { - template - void func(...) {} + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - template - void func(member*) {} + } - void test(); + namespace test_type_deduction + { - void test() { - func(0); - } + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; } - // Check for C++11 attribute support - void noret [[noreturn]] () { throw 0; } + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : @@ -4394,13 +5102,16 @@ eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="$ac_save_CXXFLAGS" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi ac_success=yes break fi @@ -4416,23 +5127,21 @@ if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} - else - HAVE_CXX11=1 + else + HAVE_CXX11=1 $as_echo "#define HAVE_CXX11 1" >>confdefs.h - fi - - fi + # no stupid static libraries case `pwd` in *\ * | *\ *) @@ -17574,7 +18283,7 @@ fi # List of supported lcov versions. - lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" # Extract the first word of "lcov", so it can be a program name with args. set dummy lcov; ac_word=$2 @@ -17692,8 +18401,14 @@ fi - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_LDFLAGS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + + + @@ -17705,6 +18420,7 @@ # # Optional: # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. # (Default: $(top_builddir)) # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated # by lcov for code coverage. (Default: @@ -17712,13 +18428,26 @@ # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage # reports to be created. (Default: # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) # - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: empty) +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore # # The generated report will be titled using the $(PACKAGE_NAME) and @@ -17729,21 +18458,44 @@ CODE_COVERAGE_DIRECTORY ?= $(top_builddir) CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS ?= +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); code_coverage_quiet = $(code_coverage_quiet_$(V)) code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) code_coverage_quiet_0 = --quiet +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + # Use recursive makes in order to ignore errors during check check-code-coverage: ifeq ($(CODE_COVERAGE_ENABLED),yes) - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture else @echo "Need to reconfigure with --enable-code-coverage" endif @@ -17751,10 +18503,10 @@ # Capture code coverage data code-coverage-capture: code-coverage-capture-hook ifeq ($(CODE_COVERAGE_ENABLED),yes) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" else @echo "Need to reconfigure with --enable-code-coverage" @@ -17765,17 +18517,18 @@ ifeq ($(CODE_COVERAGE_ENABLED),yes) clean: code-coverage-clean +distclean: code-coverage-clean code-coverage-clean: -$(LCOV) --directory $(top_builddir) -z -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . -name "*.gcda" -o -name "*.gcov" -delete + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete endif GITIGNOREFILES ?= GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean ' @@ -19870,7 +20623,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gjs $as_me 1.48.0, which was +This file was extended by gjs $as_me 1.48.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19941,7 +20694,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gjs config.status 1.48.0 +gjs config.status 1.48.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru gjs-1.48.0/configure.ac gjs-1.48.2/configure.ac --- gjs-1.48.0/configure.ac 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/configure.ac 2017-04-20 20:21:28.000000000 +0000 @@ -3,7 +3,7 @@ m4_define(pkg_major_version, 1) m4_define(pkg_minor_version, 48) -m4_define(pkg_micro_version, 0) +m4_define(pkg_micro_version, 2) m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version) m4_define(pkg_int_version, (pkg_major_version * 100 + pkg_minor_version) * 100 + pkg_micro_version) diff -Nru gjs-1.48.0/debian/changelog gjs-1.48.2/debian/changelog --- gjs-1.48.0/debian/changelog 2017-03-20 19:49:40.000000000 +0000 +++ gjs-1.48.2/debian/changelog 2017-04-20 20:58:22.000000000 +0000 @@ -1,3 +1,11 @@ +gjs (1.48.2-0ubuntu0.1) zesty; urgency=medium + + * New upstream release (LP: #1682235) + * debian/rules: + - Don't ignore test failures + + -- Jeremy Bicha Thu, 20 Apr 2017 16:58:22 -0400 + gjs (1.48.0-0ubuntu1) zesty; urgency=medium * New upstream release diff -Nru gjs-1.48.0/debian/control gjs-1.48.2/debian/control --- gjs-1.48.0/debian/control 2017-03-20 19:49:40.000000000 +0000 +++ gjs-1.48.2/debian/control 2017-04-20 20:58:22.000000000 +0000 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Iain Lane , Jeremy Bicha , Michael Biebl +Uploaders: Jeremy Bicha , Michael Biebl Build-Depends: debhelper (>= 10), dpkg-dev (>= 1.17.14), gnome-common, diff -Nru gjs-1.48.0/debian/rules gjs-1.48.2/debian/rules --- gjs-1.48.0/debian/rules 2017-03-20 19:49:40.000000000 +0000 +++ gjs-1.48.2/debian/rules 2017-04-20 20:58:22.000000000 +0000 @@ -25,9 +25,6 @@ override_dh_install: dh_install --fail-missing -X.la -override_dh_auto_test: - dh_auto_test || true - override_dh_makeshlibs: dh_makeshlibs -Xusr/lib/gjs-1.0/ -V'libgjs0f (>= $(DEB_UPSTREAM_VERSION)), libgjs0-$(LIBMOZJS)' -- -c4 diff -Nru gjs-1.48.0/gi/arg.cpp gjs-1.48.2/gi/arg.cpp --- gjs-1.48.0/gi/arg.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/arg.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/arg.h gjs-1.48.2/gi/arg.h --- gjs-1.48.0/gi/arg.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/arg.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/boxed.cpp gjs-1.48.2/gi/boxed.cpp --- gjs-1.48.0/gi/boxed.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/boxed.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/boxed.h gjs-1.48.2/gi/boxed.h --- gjs-1.48.0/gi/boxed.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/boxed.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/closure.cpp gjs-1.48.2/gi/closure.cpp --- gjs-1.48.0/gi/closure.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/closure.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/closure.h gjs-1.48.2/gi/closure.h --- gjs-1.48.0/gi/closure.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gi/closure.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/enumeration.cpp gjs-1.48.2/gi/enumeration.cpp --- gjs-1.48.0/gi/enumeration.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/enumeration.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/enumeration.h gjs-1.48.2/gi/enumeration.h --- gjs-1.48.0/gi/enumeration.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/enumeration.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/foreign.cpp gjs-1.48.2/gi/foreign.cpp --- gjs-1.48.0/gi/foreign.cpp 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/foreign.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gi/foreign.h gjs-1.48.2/gi/foreign.h --- gjs-1.48.0/gi/foreign.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/foreign.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gi/function.cpp gjs-1.48.2/gi/function.cpp --- gjs-1.48.0/gi/function.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/function.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * @@ -139,6 +139,7 @@ g_base_info_unref(interface_info); } + break; case GI_TYPE_TAG_UINT64: /* Other primitive and pointer types need to squeeze into 64-bit ffi_arg too */ case GI_TYPE_TAG_FLOAT: diff -Nru gjs-1.48.0/gi/function.h gjs-1.48.2/gi/function.h --- gjs-1.48.0/gi/function.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gi/function.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/fundamental.cpp gjs-1.48.2/gi/fundamental.cpp --- gjs-1.48.0/gi/fundamental.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/fundamental.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Intel Corporation * Copyright (c) 2008-2010 litl, LLC diff -Nru gjs-1.48.0/gi/fundamental.h gjs-1.48.2/gi/fundamental.h --- gjs-1.48.0/gi/fundamental.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/fundamental.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Intel Corporation * Copyright (c) 2008-2010 litl, LLC diff -Nru gjs-1.48.0/gi/gerror.cpp gjs-1.48.2/gi/gerror.cpp --- gjs-1.48.0/gi/gerror.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/gerror.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/gerror.h gjs-1.48.2/gi/gerror.h --- gjs-1.48.0/gi/gerror.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/gerror.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/gjs_gi_trace.h gjs-1.48.2/gi/gjs_gi_trace.h --- gjs-1.48.0/gi/gjs_gi_trace.h 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/gi/gjs_gi_trace.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 Red Hat, Inc. * diff -Nru gjs-1.48.0/gi/gtype.cpp gjs-1.48.2/gi/gtype.cpp --- gjs-1.48.0/gi/gtype.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/gtype.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/gi/gtype.h gjs-1.48.2/gi/gtype.h --- gjs-1.48.0/gi/gtype.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/gtype.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/gi/interface.cpp gjs-1.48.2/gi/interface.cpp --- gjs-1.48.0/gi/interface.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/interface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/gi/interface.h gjs-1.48.2/gi/interface.h --- gjs-1.48.0/gi/interface.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/interface.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/gi/ns.cpp gjs-1.48.2/gi/ns.cpp --- gjs-1.48.0/gi/ns.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/ns.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/ns.h gjs-1.48.2/gi/ns.h --- gjs-1.48.0/gi/ns.h 2017-01-28 02:00:04.000000000 +0000 +++ gjs-1.48.2/gi/ns.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/object.cpp gjs-1.48.2/gi/object.cpp --- gjs-1.48.0/gi/object.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/object.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * @@ -918,6 +918,7 @@ case NO_SUCH_G_PROPERTY: gjs_throw(context, "No property %s on this GObject %s", name, g_type_name(gtype)); + /* fallthrough */ case SOME_ERROR_OCCURRED: g_free(name); goto free_array_and_fail; @@ -1322,6 +1323,8 @@ update_heap_wrapper_weak_pointers(JSRuntime *rt, gpointer data) { + std::vector to_be_disassociated; + for (auto iter = weak_pointer_list.begin(); iter != weak_pointer_list.end(); ) { ObjectInstance *priv = *iter; if (priv->keep_alive.rooted() || priv->keep_alive == nullptr || @@ -1333,10 +1336,13 @@ * the weak pointer list first, since the disassociation * may also cause it to be erased.) */ + to_be_disassociated.push_back(priv->gobj); iter = weak_pointer_list.erase(iter); - disassociate_js_gobject(priv->gobj); } } + + for (GObject *gobj : to_be_disassociated) + disassociate_js_gobject(gobj); } static void @@ -1388,6 +1394,7 @@ disassociate_js_gobject(GObject *gobj) { ObjectInstance *priv = get_object_qdata(gobj); + bool had_toggle_down, had_toggle_up; g_object_weak_unref(priv->gobj, wrapped_gobj_dispose_notify, priv); @@ -1398,13 +1405,15 @@ * assertion. * https://bugzilla.gnome.org/show_bug.cgi?id=778862 */ - if (cancel_toggle_idle(gobj, TOGGLE_UP) || - cancel_toggle_idle(gobj, TOGGLE_DOWN)) + had_toggle_down = cancel_toggle_idle(gobj, TOGGLE_DOWN); + had_toggle_up = cancel_toggle_idle(gobj, TOGGLE_UP); + if (had_toggle_down != had_toggle_up) { g_critical("JS object wrapper for GObject %p (%s) is being released " "while toggle references are still pending. This may happen " "on exit in Gio.Application.vfunc_dbus_unregister(). If you " "encounter it another situation, please report a GJS bug.", gobj, G_OBJECT_TYPE_NAME(gobj)); + } invalidate_all_signals(priv); release_native_object(priv); @@ -1442,7 +1451,9 @@ object_init_list.emplace(context, object); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gobj = (GObject*) g_object_newv(gtype, params.size(), ¶ms[0]); +G_GNUC_END_IGNORE_DEPRECATIONS free_g_params(¶ms[0], params.size()); @@ -2197,14 +2208,16 @@ JS::RootedObject proto(context, gjs_lookup_object_prototype(context, gtype)); + if (!proto) + return nullptr; + JS::RootedObject global(context, gjs_get_import_global(context)); JS::RootedObject obj(context, JS_NewObjectWithGivenProto(context, JS_GetClass(proto), proto, global)); - if (obj == NULL) - goto out; + return nullptr; priv = init_object_private(context, obj); @@ -2217,7 +2230,6 @@ g_assert(priv->keep_alive == obj); } - out: return priv->keep_alive; } diff -Nru gjs-1.48.0/gi/object.h gjs-1.48.2/gi/object.h --- gjs-1.48.0/gi/object.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gi/object.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/param.cpp gjs-1.48.2/gi/param.cpp --- gjs-1.48.0/gi/param.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/param.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/param.h gjs-1.48.2/gi/param.h --- gjs-1.48.0/gi/param.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/param.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/proxyutils.cpp gjs-1.48.2/gi/proxyutils.cpp --- gjs-1.48.0/gi/proxyutils.cpp 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/proxyutils.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2012 Red Hat, Inc. * diff -Nru gjs-1.48.0/gi/proxyutils.h gjs-1.48.2/gi/proxyutils.h --- gjs-1.48.0/gi/proxyutils.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gi/proxyutils.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/repo.cpp gjs-1.48.2/gi/repo.cpp --- gjs-1.48.0/gi/repo.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/repo.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/repo.h gjs-1.48.2/gi/repo.h --- gjs-1.48.0/gi/repo.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gi/repo.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/union.cpp gjs-1.48.2/gi/union.cpp --- gjs-1.48.0/gi/union.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gi/union.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/union.h gjs-1.48.2/gi/union.h --- gjs-1.48.0/gi/union.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gi/union.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/value.cpp gjs-1.48.2/gi/value.cpp --- gjs-1.48.0/gi/value.cpp 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gi/value.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gi/value.h gjs-1.48.2/gi/value.h --- gjs-1.48.0/gi/value.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gi/value.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/byteArray.cpp gjs-1.48.2/gjs/byteArray.cpp --- gjs-1.48.0/gjs/byteArray.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/byteArray.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/byteArray.h gjs-1.48.2/gjs/byteArray.h --- gjs-1.48.0/gjs/byteArray.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gjs/byteArray.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/console.cpp gjs-1.48.2/gjs/console.cpp --- gjs-1.48.0/gjs/console.cpp 2017-03-07 02:43:40.000000000 +0000 +++ gjs-1.48.2/gjs/console.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/context.cpp gjs-1.48.2/gjs/context.cpp --- gjs-1.48.0/gjs/context.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/context.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/context-private.h gjs-1.48.2/gjs/context-private.h --- gjs-1.48.0/gjs/context-private.h 2017-03-08 20:05:43.000000000 +0000 +++ gjs-1.48.2/gjs/context-private.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2014 Colin Walters * diff -Nru gjs-1.48.0/gjs/importer.cpp gjs-1.48.2/gjs/importer.cpp --- gjs-1.48.0/gjs/importer.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/importer.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008-2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/importer.h gjs-1.48.2/gjs/importer.h --- gjs-1.48.0/gjs/importer.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gjs/importer.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/jsapi-constructor-proxy.cpp gjs-1.48.2/gjs/jsapi-constructor-proxy.cpp --- gjs-1.48.0/gjs/jsapi-constructor-proxy.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-constructor-proxy.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2016 Endless Mobile, Inc. * diff -Nru gjs-1.48.0/gjs/jsapi-constructor-proxy.h gjs-1.48.2/gjs/jsapi-constructor-proxy.h --- gjs-1.48.0/gjs/jsapi-constructor-proxy.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-constructor-proxy.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2016 Endless Mobile, Inc. * diff -Nru gjs-1.48.0/gjs/jsapi-dynamic-class.cpp gjs-1.48.2/gjs/jsapi-dynamic-class.cpp --- gjs-1.48.0/gjs/jsapi-dynamic-class.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-dynamic-class.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * 2012 Giovanni Campagna diff -Nru gjs-1.48.0/gjs/jsapi-private.cpp gjs-1.48.2/gjs/jsapi-private.cpp --- gjs-1.48.0/gjs/jsapi-private.cpp 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-private.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/jsapi-private.h gjs-1.48.2/gjs/jsapi-private.h --- gjs-1.48.0/gjs/jsapi-private.h 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-private.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/jsapi-util-args.h gjs-1.48.2/gjs/jsapi-util-args.h --- gjs-1.48.0/gjs/jsapi-util-args.h 2017-03-17 18:16:10.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util-args.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright © 2016 Endless Mobile, Inc. * diff -Nru gjs-1.48.0/gjs/jsapi-util.cpp gjs-1.48.2/gjs/jsapi-util.cpp --- gjs-1.48.0/gjs/jsapi-util.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2009 Red Hat, Inc. diff -Nru gjs-1.48.0/gjs/jsapi-util-error.cpp gjs-1.48.2/gjs/jsapi-util-error.cpp --- gjs-1.48.0/gjs/jsapi-util-error.cpp 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util-error.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/jsapi-util.h gjs-1.48.2/gjs/jsapi-util.h --- gjs-1.48.0/gjs/jsapi-util.h 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * @@ -74,7 +74,6 @@ typedef enum { GJS_GLOBAL_SLOT_IMPORTS, - GJS_GLOBAL_SLOT_KEEP_ALIVE, GJS_GLOBAL_SLOT_BYTE_ARRAY_PROTOTYPE, GJS_GLOBAL_SLOT_LAST, } GjsGlobalSlot; diff -Nru gjs-1.48.0/gjs/jsapi-util-root.h gjs-1.48.2/gjs/jsapi-util-root.h --- gjs-1.48.0/gjs/jsapi-util-root.h 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util-root.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2017 Endless Mobile, Inc. * diff -Nru gjs-1.48.0/gjs/jsapi-util-string.cpp gjs-1.48.2/gjs/jsapi-util-string.cpp --- gjs-1.48.0/gjs/jsapi-util-string.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-util-string.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/jsapi-wrapper.h gjs-1.48.2/gjs/jsapi-wrapper.h --- gjs-1.48.0/gjs/jsapi-wrapper.h 2017-03-19 07:53:58.000000000 +0000 +++ gjs-1.48.2/gjs/jsapi-wrapper.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2009 litl, LLC * Copyright (c) 2010 Red Hat, Inc. diff -Nru gjs-1.48.0/gjs/mem.cpp gjs-1.48.2/gjs/mem.cpp --- gjs-1.48.0/gjs/mem.cpp 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gjs/mem.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/mem.h gjs-1.48.2/gjs/mem.h --- gjs-1.48.0/gjs/mem.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gjs/mem.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/native.cpp gjs-1.48.2/gjs/native.cpp --- gjs-1.48.0/gjs/native.cpp 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gjs/native.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008-2010 litl, LLC * diff -Nru gjs-1.48.0/gjs/native.h gjs-1.48.2/gjs/native.h --- gjs-1.48.0/gjs/native.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/gjs/native.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/gjs/runtime.cpp gjs-1.48.2/gjs/runtime.cpp --- gjs-1.48.0/gjs/runtime.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/gjs/runtime.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Giovanni Campagna * diff -Nru gjs-1.48.0/gjs/runtime.h gjs-1.48.2/gjs/runtime.h --- gjs-1.48.0/gjs/runtime.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/gjs/runtime.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Giovanni Campagna * diff -Nru gjs-1.48.0/installed-tests/js/testCairo.js gjs-1.48.2/installed-tests/js/testCairo.js --- gjs-1.48.0/installed-tests/js/testCairo.js 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/installed-tests/js/testCairo.js 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,6 @@ const Cairo = imports.cairo; +const Gdk = imports.gi.Gdk; +const Gtk = imports.gi.Gtk; const Regress = imports.gi.Regress; function _ts(obj) { @@ -6,6 +8,10 @@ } describe('Cairo', function () { + beforeAll(function () { + Gtk.init(null); + }); + let cr, surface; beforeEach(function () { surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1); @@ -163,6 +169,17 @@ o.emit_sig_with_foreign_struct(); expect(foreignSpy).toHaveBeenCalledWith(o, cr); }); + + it('has methods when created from a C function', function () { + let win = new Gtk.OffscreenWindow(); + let da = new Gtk.DrawingArea(); + win.add(da); + da.realize(); + + cr = Gdk.cairo_create(da.window); + expect(cr.save).toBeDefined(); + expect(_ts(cr.getTarget())).toEqual('CairoSurface'); + }); }); describe('solid pattern', function () { diff -Nru gjs-1.48.0/installed-tests/js/testEverythingBasic.js gjs-1.48.2/installed-tests/js/testEverythingBasic.js --- gjs-1.48.0/installed-tests/js/testEverythingBasic.js 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/installed-tests/js/testEverythingBasic.js 2017-04-20 20:21:28.000000000 +0000 @@ -241,12 +241,31 @@ expect(Regress.test_callback_thaw_async()).toEqual(44); }); - it('method taking a GValue', function () { - expect(Regress.test_int_value_arg(42)).toEqual(42); - }); + describe('GValue boxing and unboxing', function () { + it('integer in', function () { + expect(Regress.test_int_value_arg(42)).toEqual(42); + }); + + it('integer out', function () { + expect(Regress.test_value_return(42)).toEqual(42); + }); + + it('strv in', function () { + expect(Regress.test_strv_in_gvalue()).toEqual(['one', 'two', 'three']); + }); + + const GVALUE_HASH_TABLE = { + 'integer': 12, + 'boolean': true, + 'string': 'some text', + 'strings': ['first', 'second', 'third'], + 'flags': Regress.TestFlags.FLAG1 | Regress.TestFlags.FLAG3, + 'enum': Regress.TestEnum.VALUE2, + }; - it('method returning a GValue', function () { - expect(Regress.test_value_return(42)).toEqual(42); + it('hashtable with GValue value type out', function () { + expect(Regress.test_ghash_gvalue_return()).toEqual(GVALUE_HASH_TABLE); + }); }); ['glist', 'gslist'].forEach(list => { @@ -500,10 +519,6 @@ }); }); - it('strv in GValue', function () { - expect(Regress.test_strv_in_gvalue()).toEqual(['one', 'two', 'three']); - }); - // Cannot access the variant contents, for now it('integer GVariant', function () { let ivar = Regress.test_gvariant_i(); diff -Nru gjs-1.48.0/installed-tests/js/testGIMarshalling.js gjs-1.48.2/installed-tests/js/testGIMarshalling.js --- gjs-1.48.0/installed-tests/js/testGIMarshalling.js 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/installed-tests/js/testGIMarshalling.js 2017-04-20 20:21:28.000000000 +0000 @@ -402,7 +402,7 @@ }); xit('enum can be passed into a function and packed', function () { - expect(() => GIMarshallingTests.gvalue_in_enum(GIMarshallingTests.Enum.VALUE_3)) + expect(() => GIMarshallingTests.gvalue_in_enum(GIMarshallingTests.Enum.VALUE3)) .not.toThrow(); }).pend("GJS doesn't support native enum types"); diff -Nru gjs-1.48.0/installed-tests/minijasmine.cpp gjs-1.48.2/installed-tests/minijasmine.cpp --- gjs-1.48.0/installed-tests/minijasmine.cpp 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/installed-tests/minijasmine.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2016 Philip Chimento * diff -Nru gjs-1.48.0/m4/ax_append_compile_flags.m4 gjs-1.48.2/m4/ax_append_compile_flags.m4 --- gjs-1.48.0/m4/ax_append_compile_flags.m4 2016-12-13 18:37:23.000000000 +0000 +++ gjs-1.48.2/m4/ax_append_compile_flags.m4 2017-04-12 01:00:40.000000000 +0000 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) +# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # @@ -20,6 +20,8 @@ # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# # NOTE: This macro depends on the AX_APPEND_FLAG and # AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with # AX_APPEND_LINK_FLAGS. @@ -54,12 +56,12 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 4 +#serial 5 AC_DEFUN([AX_APPEND_COMPILE_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) + AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4]) done ])dnl AX_APPEND_COMPILE_FLAGS diff -Nru gjs-1.48.0/m4/ax_append_link_flags.m4 gjs-1.48.2/m4/ax_append_link_flags.m4 --- gjs-1.48.0/m4/ax_append_link_flags.m4 2016-12-13 18:37:23.000000000 +0000 +++ gjs-1.48.2/m4/ax_append_link_flags.m4 2017-04-12 01:00:40.000000000 +0000 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) +# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # @@ -19,6 +19,8 @@ # EXTRA-FLAGS FLAG". This can for example be used to force the linker to # issue an error when a bad flag is given. # +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# # NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. # Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. # @@ -52,12 +54,12 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 4 +#serial 5 AC_DEFUN([AX_APPEND_LINK_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) for flag in $1; do - AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3]) + AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) done ])dnl AX_APPEND_LINK_FLAGS diff -Nru gjs-1.48.0/m4/ax_code_coverage.m4 gjs-1.48.2/m4/ax_code_coverage.m4 --- gjs-1.48.0/m4/ax_code_coverage.m4 2016-12-13 18:37:23.000000000 +0000 +++ gjs-1.48.2/m4/ax_code_coverage.m4 2017-04-12 01:00:40.000000000 +0000 @@ -8,14 +8,15 @@ # # DESCRIPTION # -# Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be -# included in the CFLAGS and LIBS/LDFLAGS variables of every build target -# (program or library) which should be built with code coverage support. -# Also defines CODE_COVERAGE_RULES which should be substituted in your -# Makefile; and $enable_code_coverage which can be used in subsequent -# configure output. CODE_COVERAGE_ENABLED is defined and substituted, and -# corresponds to the value of the --enable-code-coverage option, which -# defaults to being disabled. +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every +# build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. # # Test also for gcov program and create GCOV variable that could be # substituted. @@ -32,8 +33,10 @@ # Makefile.am: # # @CODE_COVERAGE_RULES@ -# my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ... +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... # my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... # # This results in a "check-code-coverage" rule being added to any # Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module @@ -42,12 +45,17 @@ # (`make check`) and build a code coverage report detailing the code which # was touched, then print the URI for the report. # +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is +# deprecated. They have the same value. +# # This code was derived from Makefile.decl in GLib, originally licenced # under LGPLv2.1+. # # LICENSE # -# Copyright (c) 2012 Philip Withnall +# Copyright (c) 2012, 2016 Philip Withnall # Copyright (c) 2012 Xan Lopez # Copyright (c) 2012 Christian Persch # Copyright (c) 2012 Paolo Borelli @@ -67,7 +75,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -#serial 5 +#serial 17 AC_DEFUN([AX_CODE_COVERAGE],[ dnl Check for --enable-code-coverage @@ -104,7 +112,7 @@ ]) # List of supported lcov versions. - lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" AC_CHECK_PROG([LCOV], [lcov], [lcov]) AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) @@ -137,18 +145,26 @@ ]) dnl Build the code coverage flags + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_LDFLAGS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LIBS]) AC_SUBST([CODE_COVERAGE_LDFLAGS]) ]) -CODE_COVERAGE_RULES=' +[CODE_COVERAGE_RULES=' # Code coverage # # Optional: # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. # (Default: $(top_builddir)) # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated # by lcov for code coverage. (Default: @@ -156,13 +172,26 @@ # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage # reports to be created. (Default: # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) # - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: empty) +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore # # The generated report will be titled using the $(PACKAGE_NAME) and @@ -173,21 +202,44 @@ CODE_COVERAGE_DIRECTORY ?= $(top_builddir) CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS ?= +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); code_coverage_quiet = $(code_coverage_quiet_$(V)) code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) code_coverage_quiet_0 = --quiet +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + # Use recursive makes in order to ignore errors during check check-code-coverage: ifeq ($(CODE_COVERAGE_ENABLED),yes) - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture else @echo "Need to reconfigure with --enable-code-coverage" endif @@ -195,10 +247,10 @@ # Capture code coverage data code-coverage-capture: code-coverage-capture-hook ifeq ($(CODE_COVERAGE_ENABLED),yes) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" else @echo "Need to reconfigure with --enable-code-coverage" @@ -209,20 +261,21 @@ ifeq ($(CODE_COVERAGE_ENABLED),yes) clean: code-coverage-clean +distclean: code-coverage-clean code-coverage-clean: -$(LCOV) --directory $(top_builddir) -z -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . -name "*.gcda" -o -name "*.gcov" -delete + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete endif GITIGNOREFILES ?= GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -' +'] AC_SUBST([CODE_COVERAGE_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) diff -Nru gjs-1.48.0/m4/ax_cxx_compile_stdcxx_11.m4 gjs-1.48.2/m4/ax_cxx_compile_stdcxx_11.m4 --- gjs-1.48.0/m4/ax_cxx_compile_stdcxx_11.m4 2016-12-13 18:37:24.000000000 +0000 +++ gjs-1.48.2/m4/ax_cxx_compile_stdcxx_11.m4 2017-04-12 01:00:40.000000000 +0000 @@ -4,23 +4,20 @@ # # SYNOPSIS # -# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) +# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 -# standard; if necessary, add switches to CXXFLAGS to enable support. +# standard; if necessary, add switches to CXX and CXXCPP to enable +# support. # -# The first argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The second argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline C++11 support is required and that the macro -# should error out if no mode with that support is found. If specified -# 'optional', then configuration proceeds regardless, after defining -# HAVE_CXX11 if and only if a supporting mode is found. +# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX +# macro with the version set to C++11. The two optional arguments are +# forwarded literally as the second and third argument respectively. +# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for +# more information. If you want to use this macro, you also need to +# download the ax_cxx_compile_stdcxx.m4 file. # # LICENSE # @@ -29,144 +26,14 @@ # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 13 +#serial 17 -m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - struct Base { - virtual void f() {} - }; - struct Child : public Base { - virtual void f() override {} - }; - - typedef check> right_angle_brackets; - - int a; - decltype(a) b; - - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); - - auto d = a; - auto l = [](){}; - // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] - struct use_l { use_l() { l(); } }; - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { - func(0); - } - } - - // Check for C++11 attribute support - void noret [[noreturn]] () { throw 0; } -]]) - -AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl - m4_if([$1], [], [], - [$1], [ext], [], - [$1], [noext], [], - [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl - m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], - [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], - [$2], [optional], [ax_cxx_compile_cxx11_required=false], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - AC_CACHE_CHECK(whether $CXX supports C++11 features by default, - ax_cv_cxx_compile_cxx11, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [ax_cv_cxx_compile_cxx11=yes], - [ax_cv_cxx_compile_cxx11=no])]) - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi - - m4_if([$1], [noext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=gnu++11 -std=gnu++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - - m4_if([$1], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx11_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) - fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - AC_MSG_NOTICE([No compiler with C++11 support was found]) - else - HAVE_CXX11=1 - AC_DEFINE(HAVE_CXX11,1, - [define if the compiler supports basic C++11 syntax]) - fi - - AC_SUBST(HAVE_CXX11) - fi -]) +AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) diff -Nru gjs-1.48.0/m4/ax_cxx_compile_stdcxx.m4 gjs-1.48.2/m4/ax_cxx_compile_stdcxx.m4 --- gjs-1.48.0/m4/ax_cxx_compile_stdcxx.m4 1970-01-01 00:00:00.000000000 +0000 +++ gjs-1.48.2/m4/ax_cxx_compile_stdcxx.m4 2017-04-12 01:00:40.000000000 +0000 @@ -0,0 +1,562 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) +# or '14' (for the C++14 standard). +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [], + [$1], [14], [], + [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++$1 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + fi + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + AC_SUBST(HAVE_CXX$1) +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_seperators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) diff -Nru gjs-1.48.0/m4/ax_is_release.m4 gjs-1.48.2/m4/ax_is_release.m4 --- gjs-1.48.0/m4/ax_is_release.m4 2016-12-13 18:37:24.000000000 +0000 +++ gjs-1.48.2/m4/ax_is_release.m4 2017-04-12 01:00:40.000000000 +0000 @@ -39,7 +39,7 @@ # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. -#serial 3 +#serial 4 AC_DEFUN([AX_IS_RELEASE],[ AC_BEFORE([AC_INIT],[$0]) @@ -47,7 +47,7 @@ m4_case([$1], [git-directory],[ # $is_release = (.git directory does not exist) - AS_IF([test -d .git],[ax_is_release=no],[ax_is_release=yes]) + AS_IF([test -d ${top_srcdir}/.git],[ax_is_release=no],[ax_is_release=yes]) ], [minor-version],[ # $is_release = ($minor_version is even) diff -Nru gjs-1.48.0/Makefile.in gjs-1.48.2/Makefile.in --- gjs-1.48.0/Makefile.in 2017-03-20 17:35:15.000000000 +0000 +++ gjs-1.48.2/Makefile.in 2017-04-20 20:27:57.000000000 +0000 @@ -145,6 +145,7 @@ $(top_srcdir)/m4/ax_compiler_flags_cxxflags.m4 \ $(top_srcdir)/m4/ax_compiler_flags_gir.m4 \ $(top_srcdir)/m4/ax_compiler_flags_ldflags.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_is_release.m4 \ $(top_srcdir)/m4/ax_pkg_check_modules.m4 \ @@ -682,8 +683,11 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ diff -Nru gjs-1.48.0/modules/cairo-context.cpp gjs-1.48.2/modules/cairo-context.cpp --- gjs-1.48.0/modules/cairo-context.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/modules/cairo-context.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo.cpp gjs-1.48.2/modules/cairo.cpp --- gjs-1.48.0/modules/cairo.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/modules/cairo.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-gradient.cpp gjs-1.48.2/modules/cairo-gradient.cpp --- gjs-1.48.0/modules/cairo-gradient.cpp 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/modules/cairo-gradient.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-image-surface.cpp gjs-1.48.2/modules/cairo-image-surface.cpp --- gjs-1.48.0/modules/cairo-image-surface.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-image-surface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-linear-gradient.cpp gjs-1.48.2/modules/cairo-linear-gradient.cpp --- gjs-1.48.0/modules/cairo-linear-gradient.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-linear-gradient.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-module.h gjs-1.48.2/modules/cairo-module.h --- gjs-1.48.0/modules/cairo-module.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/modules/cairo-module.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-path.cpp gjs-1.48.2/modules/cairo-path.cpp --- gjs-1.48.0/modules/cairo-path.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-path.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-pattern.cpp gjs-1.48.2/modules/cairo-pattern.cpp --- gjs-1.48.0/modules/cairo-pattern.cpp 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/modules/cairo-pattern.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-pdf-surface.cpp gjs-1.48.2/modules/cairo-pdf-surface.cpp --- gjs-1.48.0/modules/cairo-pdf-surface.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-pdf-surface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-private.h gjs-1.48.2/modules/cairo-private.h --- gjs-1.48.0/modules/cairo-private.h 2017-03-07 02:05:06.000000000 +0000 +++ gjs-1.48.2/modules/cairo-private.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-ps-surface.cpp gjs-1.48.2/modules/cairo-ps-surface.cpp --- gjs-1.48.0/modules/cairo-ps-surface.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-ps-surface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-radial-gradient.cpp gjs-1.48.2/modules/cairo-radial-gradient.cpp --- gjs-1.48.0/modules/cairo-radial-gradient.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-radial-gradient.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-region.cpp gjs-1.48.2/modules/cairo-region.cpp --- gjs-1.48.0/modules/cairo-region.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-region.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2014 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-solid-pattern.cpp gjs-1.48.2/modules/cairo-solid-pattern.cpp --- gjs-1.48.0/modules/cairo-solid-pattern.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-solid-pattern.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-surface.cpp gjs-1.48.2/modules/cairo-surface.cpp --- gjs-1.48.0/modules/cairo-surface.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-surface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-surface-pattern.cpp gjs-1.48.2/modules/cairo-surface-pattern.cpp --- gjs-1.48.0/modules/cairo-surface-pattern.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-surface-pattern.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/cairo-svg-surface.cpp gjs-1.48.2/modules/cairo-svg-surface.cpp --- gjs-1.48.0/modules/cairo-svg-surface.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/modules/cairo-svg-surface.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2010 litl, LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff -Nru gjs-1.48.0/modules/console.cpp gjs-1.48.2/modules/console.cpp --- gjs-1.48.0/modules/console.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/modules/console.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim: set ts=8 sw=4 et tw=78: * * ***** BEGIN LICENSE BLOCK ***** diff -Nru gjs-1.48.0/modules/console.h gjs-1.48.2/modules/console.h --- gjs-1.48.0/modules/console.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/modules/console.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/modules/modules.cpp gjs-1.48.2/modules/modules.cpp --- gjs-1.48.0/modules/modules.cpp 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/modules/modules.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright 2013 Red Hat, Inc. * diff -Nru gjs-1.48.0/modules/modules.h gjs-1.48.2/modules/modules.h --- gjs-1.48.0/modules/modules.h 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/modules/modules.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright 2013 Red Hat, Inc. * diff -Nru gjs-1.48.0/modules/system.cpp gjs-1.48.2/modules/system.cpp --- gjs-1.48.0/modules/system.cpp 2017-03-20 17:34:56.000000000 +0000 +++ gjs-1.48.2/modules/system.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/modules/system.h gjs-1.48.2/modules/system.h --- gjs-1.48.0/modules/system.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/modules/system.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2012 Red Hat, Inc. diff -Nru gjs-1.48.0/modules/tweener/equations.js gjs-1.48.2/modules/tweener/equations.js --- gjs-1.48.0/modules/tweener/equations.js 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/modules/tweener/equations.js 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2008 litl, LLC. */ /** * Equations diff -Nru gjs-1.48.0/modules/tweener/tweener.js gjs-1.48.2/modules/tweener/tweener.js --- gjs-1.48.0/modules/tweener/tweener.js 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/modules/tweener/tweener.js 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2008 litl, LLC. */ /** * Tweener @@ -510,8 +510,8 @@ if (!_engineExists) _startEngine(); // Creates a "safer", more strict tweening object - var time = isNaN(obj.time) ? 0 : obj.time; - var delay = isNaN(obj.delay) ? 0 : obj.delay; + var time = obj.time || 0; + var delay = obj.delay || 0; var transition; diff -Nru gjs-1.48.0/modules/tweener/tweenList.js gjs-1.48.2/modules/tweener/tweenList.js --- gjs-1.48.0/modules/tweener/tweenList.js 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/modules/tweener/tweenList.js 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2008 litl, LLC. */ /** * The tween list object. Stores all of the properties and information that pertain to individual tweens. diff -Nru gjs-1.48.0/NEWS gjs-1.48.2/NEWS --- gjs-1.48.0/NEWS 2017-03-20 18:56:49.000000000 +0000 +++ gjs-1.48.2/NEWS 2017-04-20 20:27:00.000000000 +0000 @@ -1,3 +1,24 @@ +Version 1.48.2 +-------------- + +- Closed bugs: + + * Intermittent crash in gnome-shell, probably in weak pointer updating code + [#781194, Georges Basile Stavracas Neto] + * Add contributor's guide [#781297, Philip Chimento] + +- Misc fixes [Debarshi Ray, Philip Chimento] + +Version 1.48.1 +-------------- + +- Closed bugs: + + * gjs crashed with SIGSEGV in gjs_object_from_g_object [#779918, Philip + Chimento] + +- Misc bug fixes [Florian Müllner, Philip Chimento, Emmanuele Bassi] + Version 1.48.0 -------------- diff -Nru gjs-1.48.0/README gjs-1.48.2/README --- gjs-1.48.0/README 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/README 2017-04-20 20:21:28.000000000 +0000 @@ -1,15 +1,9 @@ -This module contains JavaScript bindings based on gobject-introspection. +JavaScript bindings for GNOME +============================= -Because JavaScript is pretty free-form, consistent coding style and unit tests -are critical to give it some structure and keep it readable. -We propose that all GNOME usage of JavaScript conform to the style guide -in doc/Style_Guide.txt to help keep things sane. +Available as part of your GNOME distribution. Powers GNOME Shell, Polari, +GNOME Documents, and many other apps. -= Testing = +Wiki: https://wiki.gnome.org/action/show/Projects/Gjs -This module is prototyping https://live.gnome.org/GnomeGoals/InstalledTests -To run the tests, simply build it as normal. Now: - -cd installed-tests -./autogen.sh && ./configure --prefix=... && make && make install -$prefix/libexec/gjs/gjs-installed-tests +How to build and run if you want to contribute to GJS: see doc/Hacking.md diff -Nru gjs-1.48.0/test/gjs-tests.cpp gjs-1.48.2/test/gjs-tests.cpp --- gjs-1.48.0/test/gjs-tests.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/test/gjs-tests.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/test/gjs-test-utils.cpp gjs-1.48.2/test/gjs-test-utils.cpp --- gjs-1.48.0/test/gjs-test-utils.cpp 2017-03-07 02:26:16.000000000 +0000 +++ gjs-1.48.2/test/gjs-test-utils.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * Copyright (c) 2016 Endless Mobile, Inc. diff -Nru gjs-1.48.0/util/error.cpp gjs-1.48.2/util/error.cpp --- gjs-1.48.0/util/error.cpp 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/util/error.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/error.h gjs-1.48.2/util/error.h --- gjs-1.48.0/util/error.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/util/error.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/glib.cpp gjs-1.48.2/util/glib.cpp --- gjs-1.48.0/util/glib.cpp 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/util/glib.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/glib.h gjs-1.48.2/util/glib.h --- gjs-1.48.0/util/glib.h 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/util/glib.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/hash-x32.cpp gjs-1.48.2/util/hash-x32.cpp --- gjs-1.48.0/util/hash-x32.cpp 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/util/hash-x32.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Red Hat, Inc. * diff -Nru gjs-1.48.0/util/hash-x32.h gjs-1.48.2/util/hash-x32.h --- gjs-1.48.0/util/hash-x32.h 2016-12-23 00:25:32.000000000 +0000 +++ gjs-1.48.2/util/hash-x32.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2013 Red Hat, Inc. * diff -Nru gjs-1.48.0/util/log.cpp gjs-1.48.2/util/log.cpp --- gjs-1.48.0/util/log.cpp 2017-03-07 02:20:00.000000000 +0000 +++ gjs-1.48.2/util/log.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/log.h gjs-1.48.2/util/log.h --- gjs-1.48.0/util/log.h 2017-03-08 02:00:40.000000000 +0000 +++ gjs-1.48.2/util/log.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/misc.cpp gjs-1.48.2/util/misc.cpp --- gjs-1.48.0/util/misc.cpp 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/util/misc.cpp 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/util/misc.h gjs-1.48.2/util/misc.h --- gjs-1.48.0/util/misc.h 2017-01-28 20:11:10.000000000 +0000 +++ gjs-1.48.2/util/misc.h 2017-04-20 20:21:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* * Copyright (c) 2008 litl, LLC * diff -Nru gjs-1.48.0/win32/config.h.win32 gjs-1.48.2/win32/config.h.win32 --- gjs-1.48.0/win32/config.h.win32 2017-03-20 17:35:19.000000000 +0000 +++ gjs-1.48.2/win32/config.h.win32 2017-04-20 20:28:02.000000000 +0000 @@ -13,7 +13,7 @@ #define GETTEXT_PACKAGE "gjs" /* The gjs version as an integer */ -#define GJS_VERSION 14800 +#define GJS_VERSION 14802 /* define if the compiler supports basic C++11 syntax */ #define HAVE_CXX11 1 @@ -74,7 +74,7 @@ #define PACKAGE_NAME "gjs" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gjs 1.48.0" +#define PACKAGE_STRING "gjs 1.48.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gjs" @@ -83,10 +83,10 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.48.0" +#define PACKAGE_VERSION "1.48.2" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.48.0" +#define VERSION "1.48.2"