on master help sign in
Merge pull request #3989 from melted/ptr_eq
ebd2e6fNiklas Larsson
libs/prelude/Prelude.idr+1−2
@@ -280,8 +280,7 @@ namespace JSNull
280
280
281||| Pointer equality
281||| Pointer equality
282eqPtr : Ptr -> Ptr -> IO Bool
282eqPtr : Ptr -> Ptr -> IO Bool
283−eqPtr x y = do eq <- foreign FFI_C "idris_eqPtr" (Ptr -> Ptr -> IO Int) x y
283+eqPtr x y = pure $ prim__eqPtr x y /= 0
284− pure (eq /= 0)
285
284
286||| Loop while some test is true
285||| Loop while some test is true
287|||
286|||
rts/idris_stdfgn.c−4
@@ -103,10 +103,6 @@ int isNull(void* ptr) {
103 return ptr==NULL;
103 return ptr==NULL;
104}
104}
105
105
106−int idris_eqPtr(void* x, void* y) {
107− return x==y;
108−}
109−
110void* idris_stdin() {
106void* idris_stdin() {
111 return (void*)stdin;
107 return (void*)stdin;
112}
108}
rts/idris_stdfgn.h−2
@@ -29,8 +29,6 @@ VAL idris_getString(VM* vm, void* buffer);
29void* do_popen(const char* cmd, const char* mode);
29void* do_popen(const char* cmd, const char* mode);
30int fpoll(void* h);
30int fpoll(void* h);
31
31
32−
33−int idris_eqPtr(void* x, void* y);
34int isNull(void* ptr);
32int isNull(void* ptr);
35void* idris_stdin();
33void* idris_stdin();
36
34