blueloveTH %!s(int64=2) %!d(string=hai) anos
pai
achega
cd7e5c27f3
Modificáronse 4 ficheiros con 9 adicións e 5 borrados
  1. 3 0
      src/ceval.h
  2. 2 2
      src/cffi.h
  3. 2 2
      src/config.h
  4. 2 1
      src/lexer.h

+ 3 - 0
src/ceval.h

@@ -725,8 +725,10 @@ __NEXT_STEP:;
 /**********************************************************************/
 /**********************************************************************/
             UNREACHABLE();
             UNREACHABLE();
         }catch(HandledException& e){
         }catch(HandledException& e){
+            PK_UNUSED(e);
             continue;
             continue;
         }catch(UnhandledException& e){
         }catch(UnhandledException& e){
+            PK_UNUSED(e);
             PyObject* obj = POPX();
             PyObject* obj = POPX();
             Exception& _e = CAST(Exception&, obj);
             Exception& _e = CAST(Exception&, obj);
             _e.st_push(frame->snapshot());
             _e.st_push(frame->snapshot());
@@ -742,6 +744,7 @@ __NEXT_STEP:;
             if(frame.index < base_id) throw ToBeRaisedException();
             if(frame.index < base_id) throw ToBeRaisedException();
             need_raise = true;
             need_raise = true;
         }catch(ToBeRaisedException& e){
         }catch(ToBeRaisedException& e){
+            PK_UNUSED(e);
             need_raise = true;
             need_raise = true;
         }
         }
     }
     }

+ 2 - 2
src/cffi.h

@@ -196,8 +196,8 @@ struct C99Struct{
     char* p;
     char* p;
     int size;
     int size;
 
 
-    void _init(int size){
-        this->size = size;
+    void _init(int new_size){
+        this->size = new_size;
         if(size <= INLINE_SIZE){
         if(size <= INLINE_SIZE){
             p = _inlined;
             p = _inlined;
         }else{
         }else{

+ 2 - 2
src/config.h

@@ -66,9 +66,9 @@ namespace pkpy{
 
 
 #ifdef _MSC_VER
 #ifdef _MSC_VER
 #pragma warning (disable:4267)
 #pragma warning (disable:4267)
-#pragma warning (disable:4101)
+#pragma warning (disable:4100)
 #pragma warning (disable:4244)
 #pragma warning (disable:4244)
-#define _CRT_NONSTDC_NO_DEPRECATE
+#define strdup _strdup
 #endif
 #endif
 
 
 #ifdef _MSC_VER
 #ifdef _MSC_VER

+ 2 - 1
src/lexer.h

@@ -382,7 +382,8 @@ struct Lexer {
                 add_token(TK("@num"), Number::stoi(m[0], &size, base));
                 add_token(TK("@num"), Number::stoi(m[0], &size, base));
             }
             }
             PK_ASSERT((int)size == (int)m.length());
             PK_ASSERT((int)size == (int)m.length());
-        }catch(std::exception& _){
+        }catch(std::exception& e){
+            PK_UNUSED(e);
             SyntaxError("invalid number literal");
             SyntaxError("invalid number literal");
         } 
         } 
     }
     }