Commit 722faa1a authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

undo last two commits

parent 9a862c61
......@@ -491,9 +491,9 @@ ecl_foreign_data_ref_elt(void *p, enum ecl_ffi_tag tag)
case ECL_FFI_OBJECT:
return *(cl_object *)p;
case ECL_FFI_FLOAT:
return ecl_make_single_float_unchecked(*(float *)p);
return ecl_make_single_float(*(float *)p);
case ECL_FFI_DOUBLE:
return ecl_make_double_float_unchecked(*(double *)p);
return ecl_make_double_float(*(double *)p);
case ECL_FFI_VOID:
return ECL_NIL;
default:
......
......@@ -526,59 +526,6 @@ ecl_make_long_float(long double f)
}
#endif
cl_object
ecl_make_single_float_unchecked(float f)
{
cl_object x;
if (f == (float)0.0) {
#if defined(ECL_SIGNED_ZERO)
if (signbit(f))
return cl_core.singlefloat_minus_zero;
#endif
return cl_core.singlefloat_zero;
}
x = ecl_alloc_object(t_singlefloat);
ecl_single_float(x) = f;
return(x);
}
cl_object
ecl_make_double_float_unchecked(double f)
{
cl_object x;
if (f == (double)0.0) {
#if defined(ECL_SIGNED_ZERO)
if (signbit(f))
return cl_core.doublefloat_minus_zero;
#endif
return cl_core.doublefloat_zero;
}
x = ecl_alloc_object(t_doublefloat);
ecl_double_float(x) = f;
return(x);
}
#ifdef ECL_LONG_FLOAT
cl_object
ecl_make_long_float_unchecked(long double f)
{
cl_object x;
if (f == (long double)0.0) {
#if defined(ECL_SIGNED_ZERO)
if (signbit(f))
return cl_core.longfloat_minus_zero;
#endif
return cl_core.longfloat_zero;
}
x = ecl_alloc_object(t_longfloat);
x->longfloat.value = f;
return x;
}
#endif
cl_object
ecl_make_complex(cl_object r, cl_object i)
{
......
......@@ -31,9 +31,9 @@
(:cl-index integer "cl_index" "ecl_make_unsigned_integer" "ecl_to_cl_index" "ecl_fixnum")
(:long-long integer "ecl_long_long_t" "ecl_make_long_long" "ecl_to_long_long" "ecl_to_long_long")
(:unsigned-long-long integer "ecl_ulong_long_t" "ecl_make_ulong_long" "ecl_to_ulong_long" "ecl_to_ulong_long")
(:float single-float "float" "ecl_make_single_float_unchecked" "ecl_to_float" "ecl_single_float")
(:double double-float "double" "ecl_make_double_float_unchecked" "ecl_to_double" "ecl_double_float")
(:long-double long-float "long double" "ecl_make_long_float_unchecked" "ecl_to_long_double" "ecl_long_float")
(:float single-float "float" "ecl_make_single_float" "ecl_to_float" "ecl_single_float")
(:double double-float "double" "ecl_make_double_float" "ecl_to_double" "ecl_double_float")
(:long-double long-float "long double" "ecl_make_long_float" "ecl_to_long_double" "ecl_long_float")
(:unsigned-char base-char "unsigned char" "CODE_CHAR" "ecl_base_char_code" "CHAR_CODE")
(:char base-char "char" "CODE_CHAR" "ecl_base_char_code" "CHAR_CODE")
(:wchar character "ecl_character" "CODE_CHAR" "ecl_char_code" "CHAR_CODE")
......
......@@ -478,10 +478,10 @@
(wt-nl "return " (case return-type
(FIXNUM "ecl_make_fixnum")
(CHARACTER "CODE_CHAR")
(DOUBLE-FLOAT "ecl_make_double_float_unchecked")
(SINGLE-FLOAT "ecl_make_single_float_unchecked")
(DOUBLE-FLOAT "ecl_make_double_float")
(SINGLE-FLOAT "ecl_make_single_float")
#+long-float
(LONG-FLOAT "ecl_make_long_float_unchecked")
(LONG-FLOAT "ecl_make_long_float")
(otherwise ""))
"(LI" cfun "(")
(do ((types arg-types (cdr types))
......
......@@ -1109,8 +1109,6 @@ extern ECL_API cl_object ecl_make_long_long(ecl_long_long_t i);
extern ECL_API cl_object ecl_make_ratio(cl_object num, cl_object den);
extern ECL_API cl_object ecl_make_single_float(float f);
extern ECL_API cl_object ecl_make_double_float(double f);
extern ECL_API cl_object ecl_make_single_float_unchecked(float f);
extern ECL_API cl_object ecl_make_double_float_unchecked(double f);
extern ECL_API cl_object ecl_make_complex(cl_object r, cl_object i);
extern ECL_API cl_object cl_rational(cl_object x);
#define cl_rationalize cl_rational
......@@ -1119,7 +1117,6 @@ extern ECL_API double ecl_to_double(cl_object x);
#ifdef ECL_LONG_FLOAT
extern ECL_API long double ecl_to_long_double(cl_object x);
extern ECL_API cl_object ecl_make_long_float(long double f);
extern ECL_API cl_object ecl_make_long_float_unchecked(long double f);
#endif
#ifdef ECL_IEEE_FP
extern ECL_API cl_object si_nan();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment