Răsfoiți Sursa

Update test_answers.txt

blueloveTH 2 ani în urmă
părinte
comite
5dab337485
4 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 1 1
      c_bindings/test_answers.txt
  2. 1 1
      include/pocketpy/str.h
  3. 1 1
      src/repl.cpp
  4. 2 2
      src/str.cpp

+ 1 - 1
c_bindings/test_answers.txt

@@ -23,7 +23,7 @@ hello!
 None
 
 ====== test voidp methods ======
-<void* at 0x7b>
+<void* at 0x000000000000007B>
 123
 
 ====== test sizing and indexing ======

+ 1 - 1
include/pocketpy/str.h

@@ -141,7 +141,7 @@ struct SStream{
     SStream& operator<<(const char*);
     SStream& operator<<(int);
     SStream& operator<<(unsigned int);
-    SStream& operator<<(unsigned long);
+    SStream& operator<<(uint64_t);
     SStream& operator<<(i64);
     SStream& operator<<(f64);
     SStream& operator<<(const std::string&);

+ 1 - 1
src/repl.cpp

@@ -3,7 +3,7 @@
 namespace pkpy {
     REPL::REPL(VM* vm) : vm(vm){
         vm->stdout_write("pocketpy " PK_VERSION " (" __DATE__ ", " __TIME__ ") ");
-        vm->stdout_write(fmt("[", (int)sizeof(void*)*8, " bit] on ", kPlatformStrings[PK_SYS_PLATFORM], "\n"));
+        vm->stdout_write(fmt("[", sizeof(void*)*8, " bit] on ", kPlatformStrings[PK_SYS_PLATFORM], "\n"));
         vm->stdout_write("https://github.com/blueloveTH/pocketpy" "\n");
         vm->stdout_write("Type \"exit()\" to exit." "\n");
     }

+ 2 - 2
src/str.cpp

@@ -473,8 +473,8 @@ int utf8len(unsigned char c, bool suppress){
         return (*this) << static_cast<i64>(val);
     }
 
-    SStream& SStream::operator<<(unsigned long val){
-        // unsigned long could be out of range of `i64`, use `std::to_string` instead
+    SStream& SStream::operator<<(uint64_t val){
+        // uint64_t could be out of range of `i64`, use `std::to_string` instead
         return (*this) << std::to_string(val);
     }