[Git][cmucl/cmucl][issue-242-c-call-char-result-wrong] Rename unsigned_to_bool to int_to_bool

Raymond Toy (@rtoy) gitlab at common-lisp.net
Sat Jul 1 14:22:08 UTC 2023



Raymond Toy pushed to branch issue-242-c-call-char-result-wrong at cmucl / cmucl


Commits:
b921dc29 by Raymond Toy at 2023-07-01T07:19:31-07:00
Rename unsigned_to_bool to int_to_bool

Since the global `test_arg` is an `int`, rename `unsigned_to_bool` to
`int_to_bool` since we're converting an `int` to a `bool` instead of
an `unsigned`.

This makes the name of the function consistent with what is being
converted.  Doesn't affect the current test because we only test with
small non-negative integers.

- - - - -


2 changed files:

- tests/issues.lisp
- tests/test-return.c


Changes:

=====================================
tests/issues.lisp
=====================================
@@ -1088,7 +1088,7 @@
   (flet ((fun (n)
 	   (setf test-arg n)
 	   (alien:alien-funcall
-	    (alien:extern-alien "unsigned_to_bool"
+	    (alien:extern-alien "int_to_bool"
 				(function alien:boolean))))
 	 (expected (n)
 	   (not (zerop n))))


=====================================
tests/test-return.c
=====================================
@@ -38,7 +38,7 @@ int_to_unsigned_int()
   return (unsigned int) test_arg;
 }
 
-_Bool unsigned_to_bool()
+_Bool int_to_bool()
 {
   return (_Bool) test_arg;
 }



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b921dc292adcd038a13a8c8048430a985e7a0468

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b921dc292adcd038a13a8c8048430a985e7a0468
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20230701/8d1efd75/attachment.html>


More information about the cmucl-cvs mailing list