projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ff270f
)
C-peek-cstringp! now returns () at NULL on end of a strvec.
author
Matt Birkholz
<matt@birkholz.chandler.az.us>
Thu, 11 Aug 2011 00:14:51 +0000
(17:14 -0700)
committer
Matt Birkholz
<matt@birkholz.chandler.az.us>
Thu, 11 Aug 2011 00:14:51 +0000
(17:14 -0700)
src/microcode/pruxffi.c
patch
|
blob
|
history
diff --git
a/src/microcode/pruxffi.c
b/src/microcode/pruxffi.c
index 26fc706f2c1a26855c0338cbf2cd701c5533e915..805d6eb40ca1292e22ec702b5eee0dddfde9c702 100644
(file)
--- a/
src/microcode/pruxffi.c
+++ b/
src/microcode/pruxffi.c
@@
-185,9
+185,16
@@
DEFINE_PRIMITIVE ("C-PEEK-CSTRINGP!", Prim_peek_cstringp_bang, 2, 2, 0)
PRIMITIVE_HEADER (2);
{
char ** ptr = (ALIEN_ADDRESS_LOC (char *));
- SCM string = char_pointer_to_string (*ptr);
- set_alien_address ((ARG_REF (1)), (ptr + 1)); /* No more aborts! */
- PRIMITIVE_RETURN (string);
+ if (*ptr == NULL)
+ {
+ PRIMITIVE_RETURN (SHARP_F);
+ }
+ else
+ {
+ SCM string = char_pointer_to_string (*ptr);
+ set_alien_address ((ARG_REF (1)), (ptr + 1)); /* No more aborts! */
+ PRIMITIVE_RETURN (string);
+ }
}
}