Browse Source

fix platform_getTick, fix socket LWIP gethostname

lyon 3 years ago
parent
commit
64091bcd55

+ 1 - 1
package/PikaStdDevice/PikaStdDevice_Time.c

@@ -28,7 +28,7 @@ void PikaStdDevice_Time_sleep_s(PikaObj* self, int s) {
 }
 
 void PikaStdDevice_Time_platformGetTick(PikaObj* self) {
-    obj_setInt(self, "tick", __platform_get_tick_ms());
+    obj_setInt(self, "tick", __platform_getTick());
 }
 
 /*

+ 1 - 1
package/socket/PikaPlatform_socket.c

@@ -71,7 +71,7 @@ PIKA_WEAK int __platform_recv(int __fd, void* __buf, size_t __n, int __flags) {
 
 /* gethostname */
 PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
-#if defined(__linux__) || PIKA_LWIP_ENABLE
+#if defined(__linux__)
     return gethostname(__name, __len);
 #else
     WEAK_FUNCTION_NEED_OVERRIDE_ERROR();

+ 1 - 1
port/linux/package/pikascript/pikascript-lib/PikaStdDevice/PikaStdDevice_Time.c

@@ -28,7 +28,7 @@ void PikaStdDevice_Time_sleep_s(PikaObj* self, int s) {
 }
 
 void PikaStdDevice_Time_platformGetTick(PikaObj* self) {
-    obj_setInt(self, "tick", __platform_get_tick_ms());
+    obj_setInt(self, "tick", __platform_getTick());
 }
 
 /*

+ 1 - 1
port/linux/package/pikascript/pikascript-lib/socket/PikaPlatform_socket.c

@@ -71,7 +71,7 @@ PIKA_WEAK int __platform_recv(int __fd, void* __buf, size_t __n, int __flags) {
 
 /* gethostname */
 PIKA_WEAK int __platform_gethostname(char* __name, size_t __len) {
-#if defined(__linux__) || PIKA_LWIP_ENABLE
+#if defined(__linux__)
     return gethostname(__name, __len);
 #else
     WEAK_FUNCTION_NEED_OVERRIDE_ERROR();