summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-09-22 11:23:00 +0200
committerAndy Wingo <wingo@pobox.com>2017-09-22 11:35:36 +0200
commit04f48e94b573eaede0751110c583293cc34cd8f9 (patch)
treeb4062d8108445ccd0ef0adcb14c6cdc96ea41fcf /NEWS
parent9ac0544efff1ce5c9e5a4dcf6477cf2794d11ef0 (diff)
Deprecate struct "self" slots
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use a normal slot instead of a self slot. * libguile/print.c (make_print_state): Initialize "handle" slot manually. * libguile/struct.c (issue_deprecation_warning_for_self_slots): New helper, called when making vtables to issue deprecation warnings for "self" slots. Avoids warning for the "self" slot that's part of the fixed vtable slots. (scm_i_struct_inherit_vtable_magic): Call issue_deprecation_warning_for_self_slots. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove references to self slots. * NEWS: Add entry.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS12
1 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f13f40a86..78e3b30c3 100644
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@ If you don't care whether the URI is a relative-ref or not, use
In the future `uri?' will return a true value only for URIs that specify
a scheme.
-** Tail arrays deprecated
+** Struct tail arrays deprecated
Guile's structures used to have a facility whereby each instance of a
vtable can contain a variable-length tail array of values. The length
@@ -57,6 +57,16 @@ will be removed from Guile 3.0. Likewise, `make-struct' /
`scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
the `make-struct' name!
+** Struct "self" slots deprecated
+
+It used to be that you could make a structure vtable that had "self"
+slots. Instances of that vtable would have those slots initialized to
+the instance itself. This can be useful in C code where you might have
+a pointer to the data array, and want to get the `SCM' handle for the
+structure. However this was a little used complication without any use
+in Scheme code. To replace it, just use "p" slots and initialize the
+slot values manually on initialization.
+
* Bug fixes
** Enable GNU Readline 7.0's support for "bracketed paste".