mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
WIP - obj_char2obj
This commit is contained in:
parent
3783da2674
commit
7f8cc02c50
1 changed files with 2 additions and 2 deletions
|
@ -2755,7 +2755,7 @@ object Cyc_char2integer(object chr)
|
||||||
|
|
||||||
object Cyc_integer2char(void *data, object n)
|
object Cyc_integer2char(void *data, object n)
|
||||||
{
|
{
|
||||||
int val = 0;
|
char_type val = 0;
|
||||||
|
|
||||||
Cyc_check_num(data, n);
|
Cyc_check_num(data, n);
|
||||||
val = unbox_number(n);
|
val = unbox_number(n);
|
||||||
|
@ -6095,7 +6095,7 @@ void _read_return_character(void *data, port_type *p)
|
||||||
return_thread_runnable(data, obj_char2obj('\t'));
|
return_thread_runnable(data, obj_char2obj('\t'));
|
||||||
} else if(strlen(p->tok_buf) > 1 && p->tok_buf[0] == 'x') {
|
} else if(strlen(p->tok_buf) > 1 && p->tok_buf[0] == 'x') {
|
||||||
const char *buf = p->tok_buf + 1;
|
const char *buf = p->tok_buf + 1;
|
||||||
int result = strtol(buf, NULL, 16);
|
char_type result = strtol(buf, NULL, 16);
|
||||||
return_thread_runnable(data, obj_char2obj(result));
|
return_thread_runnable(data, obj_char2obj(result));
|
||||||
} else {
|
} else {
|
||||||
char buf[31];
|
char buf[31];
|
||||||
|
|
Loading…
Add table
Reference in a new issue