yaaay, mingw.....

This commit is contained in:
ThePhD 2017-08-13 13:24:59 -04:00
parent 769faeec64
commit 3a12435b17
2 changed files with 20 additions and 6 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2017-08-13 17:16:44.325943 UTC // Generated 2017-08-13 17:24:40.860735 UTC
// This header was generated with sol v2.18.0 (revision 7d2665e) // This header was generated with sol v2.18.0 (revision 769faee)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -5572,6 +5572,11 @@ namespace sol {
// beginning of sol/demangle.hpp // beginning of sol/demangle.hpp
#include <cctype> #include <cctype>
#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6)
extern "C" {
#include <ctype.h>
}
#endif // MinGW is on some stuff
#include <locale> #include <locale>
namespace sol { namespace sol {
@ -5579,6 +5584,8 @@ namespace sol {
#if defined(__GNUC__) || defined(__clang__) #if defined(__GNUC__) || defined(__clang__)
template <typename T, class seperator_mark = int> template <typename T, class seperator_mark = int>
inline std::string ctti_get_type_name() { inline std::string ctti_get_type_name() {
// cardinal sins from MINGW
using namespace std;
const static std::array<std::string, 2> removals = { { "{anonymous}", "(anonymous namespace)" } }; const static std::array<std::string, 2> removals = { { "{anonymous}", "(anonymous namespace)" } };
std::string name = __PRETTY_FUNCTION__; std::string name = __PRETTY_FUNCTION__;
std::size_t start = name.find_first_of('['); std::size_t start = name.find_first_of('[');
@ -5595,8 +5602,8 @@ namespace sol {
if (start != std::string::npos) { if (start != std::string::npos) {
name.erase(start - 2, name.length()); name.erase(start - 2, name.length());
} }
while (!name.empty() && std::isblank(name.front())) name.erase(name.begin()); while (!name.empty() && isblank(name.front())) name.erase(name.begin());
while (!name.empty() && std::isblank(name.back())) name.pop_back(); while (!name.empty() && isblank(name.back())) name.pop_back();
for (std::size_t r = 0; r < removals.size(); ++r) { for (std::size_t r = 0; r < removals.size(); ++r) {
auto found = name.find(removals[r]); auto found = name.find(removals[r]);

View File

@ -25,6 +25,11 @@
#include <string> #include <string>
#include <array> #include <array>
#include <cctype> #include <cctype>
#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6)
extern "C" {
#include <ctype.h>
}
#endif // MinGW is on some stuff
#include <locale> #include <locale>
namespace sol { namespace sol {
@ -32,6 +37,8 @@ namespace sol {
#if defined(__GNUC__) || defined(__clang__) #if defined(__GNUC__) || defined(__clang__)
template <typename T, class seperator_mark = int> template <typename T, class seperator_mark = int>
inline std::string ctti_get_type_name() { inline std::string ctti_get_type_name() {
// cardinal sins from MINGW
using namespace std;
const static std::array<std::string, 2> removals = { { "{anonymous}", "(anonymous namespace)" } }; const static std::array<std::string, 2> removals = { { "{anonymous}", "(anonymous namespace)" } };
std::string name = __PRETTY_FUNCTION__; std::string name = __PRETTY_FUNCTION__;
std::size_t start = name.find_first_of('['); std::size_t start = name.find_first_of('[');
@ -48,8 +55,8 @@ namespace sol {
if (start != std::string::npos) { if (start != std::string::npos) {
name.erase(start - 2, name.length()); name.erase(start - 2, name.length());
} }
while (!name.empty() && std::isblank(name.front())) name.erase(name.begin()); while (!name.empty() && isblank(name.front())) name.erase(name.begin());
while (!name.empty() && std::isblank(name.back())) name.pop_back(); while (!name.empty() && isblank(name.back())) name.pop_back();
for (std::size_t r = 0; r < removals.size(); ++r) { for (std::size_t r = 0; r < removals.size(); ++r) {
auto found = name.find(removals[r]); auto found = name.find(removals[r]);