few more changes to comply with c/scheme48.h
This commit is contained in:
parent
d2fc94c2da
commit
0ffe78e179
|
@ -143,7 +143,7 @@
|
|||
;;; then try a DEFINE-FOREIGN.
|
||||
(define *simple-argrep-alist* '(
|
||||
|
||||
(char #("char ~a" char? "EXTRACT_CHAR" #f))
|
||||
(char #("char ~a" char? "s48_extract_char" #f))
|
||||
(bool #("int ~a" #f "EXTRACT_BOOLEAN" #f))
|
||||
|
||||
(integer #("int ~a" integer? "s48_extract_fixnum" #f))
|
||||
|
@ -174,12 +174,12 @@
|
|||
;;; Emit C code to copy a C string into its carrier.
|
||||
(define (str-and-len->carrier carrier str)
|
||||
(format #f
|
||||
"{SetAlienVal(CAR(~a),(long) ~a); SET_CDR(~a,strlen_or_false(~a));}"
|
||||
"S48_SET_CAR(~a,(long) ~a); S48_SET_CDR(~a,strlen_or_false(~a));"
|
||||
carrier str carrier str))
|
||||
|
||||
;;; Carrier and assignment-generator for alien values:
|
||||
(define (simple-assign carrier val)
|
||||
(format #f "SetAlienVal(~a,(long) ~a);" carrier val))
|
||||
(format #f "S48_SET_CAR(~a,(long) ~a);" carrier val)) ;;JMG: untested
|
||||
|
||||
;;; Note: When MAKE-CARRIER and S-CVTR fields are taken from this table,
|
||||
;;; they are symbols that are syntactically closed in the macro expander's
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
|
||||
// JMG: some hacks to leave to old sources untouched
|
||||
#define ENTER_BOOLEAN(x) (x ? S48_TRUE : S48_FALSE)
|
||||
#define ENTER_FIXNUM(x) (s48_enter_fixnum(x))
|
||||
#define SCHFALSE S48_FALSE
|
||||
#define EXTRACT_BOOLEAN(x) ((x==S48_TRUE) ? 1 : 0)
|
||||
//#define ENTER_FIXNUM(x) (s48_enter_fixnum(x))
|
||||
//#define SCHFALSE S48_FALSE
|
||||
|
||||
extern char *scheme2c_strcpy(s48_value sstr);
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ void set_strvec_carriers(s48_value svec, char const * const * cvec)
|
|||
s48_value alien = S48_CAR(carrier);
|
||||
int strl = strlen(*cv);
|
||||
s48_value cdrinspe = s48_enter_fixnum(strl);
|
||||
S48_UNSAFE_SET_CDR(carrier, cdrinspe);
|
||||
S48_UNSAFE_SET_CAR(carrier, (long) *cv);
|
||||
S48_SET_CDR(carrier, cdrinspe);
|
||||
S48_SET_CAR(carrier, (long) *cv);
|
||||
//AlienVal(alien) = (long) *cv;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue