[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/07: Remove unused code in struct.c
From: |
Andy Wingo |
Subject: |
[Guile-commits] 05/07: Remove unused code in struct.c |
Date: |
Fri, 22 Sep 2017 05:49:34 -0400 (EDT) |
wingo pushed a commit to branch stable-2.2
in repository guile.
commit 9ac0544efff1ce5c9e5a4dcf6477cf2794d11ef0
Author: Andy Wingo <address@hidden>
Date: Fri Sep 22 10:32:36 2017 +0200
Remove unused code in struct.c
* libguile/struct.c (scm_make_struct_layout, scm_struct-ref)
(scm_struct_set_x): Remove commented-out support for signed and double
raw fields.
---
libguile/struct.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/libguile/struct.c b/libguile/struct.c
index 78099ac..08451e7 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -100,10 +100,6 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout",
1, 0, 0,
{
case 'u':
case 'p':
-#if 0
- case 'i':
- case 'd':
-#endif
case 's':
break;
default:
@@ -134,16 +130,6 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout",
1, 0, 0,
SCM_MISC_ERROR ("unrecognized ref specification: ~S",
scm_list_1 (SCM_MAKE_CHAR (c)));
}
-#if 0
- if (scm_i_string_ref (fields, x, 'd'))
- {
- if (!scm_i_string_ref (fields, x+2, '-'))
- SCM_MISC_ERROR ("missing dash field at position ~A",
- scm_list_1 (scm_from_int (x / 2)));
- x += 2;
- goto recheck_ref;
- }
-#endif
}
new_sym = scm_string_to_symbol (fields);
}
@@ -758,16 +744,6 @@ SCM_DEFINE (scm_struct_ref, "struct-ref", 2, 0, 0,
answer = scm_from_ulong (data[p]);
break;
-#if 0
- case 'i':
- answer = scm_from_long (data[p]);
- break;
-
- case 'd':
- answer = scm_make_real (*((double *)&(data[p])));
- break;
-#endif
-
case 's':
case 'p':
answer = SCM_PACK (data[p]);
@@ -841,16 +817,6 @@ SCM_DEFINE (scm_struct_set_x, "struct-set!", 3, 0, 0,
data[p] = SCM_NUM2ULONG (3, val);
break;
-#if 0
- case 'i':
- data[p] = SCM_NUM2LONG (3, val);
- break;
-
- case 'd':
- *((double *)&(data[p])) = scm_num2dbl (val, (char *)SCM_ARG3);
- break;
-#endif
-
case 'p':
data[p] = SCM_UNPACK (val);
break;
- [Guile-commits] branch stable-2.2 updated (ac0d3dc -> c7c7588), Andy Wingo, 2017/09/22
- [Guile-commits] 05/07: Remove unused code in struct.c,
Andy Wingo <=
- [Guile-commits] 07/07: Fix up make-struct-layout and make-struct/no-tail docstrings, Andy Wingo, 2017/09/22
- [Guile-commits] 03/07: Remove references to tail arrays in the documentation, Andy Wingo, 2017/09/22
- [Guile-commits] 01/07: psyntax generates calls to make-struct/no-tail, Andy Wingo, 2017/09/22
- [Guile-commits] 02/07: Use make-struct/no-tail instead of make-struct, Andy Wingo, 2017/09/22
- [Guile-commits] 06/07: Deprecate struct "self" slots, Andy Wingo, 2017/09/22
- [Guile-commits] 04/07: Deprecate make-struct, Andy Wingo, 2017/09/22