Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
This commit is contained in:
		@@ -150,8 +150,8 @@ namespace chaiscript
 | 
			
		||||
          return std::string(t_str.begin(), t_str.end());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#ifdef _UNICODE
 | 
			
		||||
      template<typename T>
 | 
			
		||||
#if defined(_UNICODE) || defined(UNICODE)
 | 
			
		||||
        template<typename T>
 | 
			
		||||
        static std::wstring to_proper_string(const T &t_str)
 | 
			
		||||
        {
 | 
			
		||||
          return to_wstring(t_str);
 | 
			
		||||
@@ -166,7 +166,7 @@ namespace chaiscript
 | 
			
		||||
 | 
			
		||||
      static std::string get_error_message(DWORD t_err)
 | 
			
		||||
      {
 | 
			
		||||
#ifdef _UNICODE
 | 
			
		||||
#if defined(_UNICODE) || defined(UNICODE)
 | 
			
		||||
        typedef LPWSTR StringType;
 | 
			
		||||
        std::wstring retval = L"Unknown Error";
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ char *mystrdup (const char *s) {
 | 
			
		||||
  char *d = static_cast<char*>(malloc (len+1));
 | 
			
		||||
  if (d == nullptr) return nullptr;          // No memory
 | 
			
		||||
#ifdef CHAISCRIPT_MSVC
 | 
			
		||||
  strcpy_s(d, len, s);                        // Copy the characters
 | 
			
		||||
  strcpy_s(d, len+1, s);                        // Copy the characters
 | 
			
		||||
#else
 | 
			
		||||
  strncpy(d,s,len);                        // Copy the characters
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user