1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

Change name of "static" flag indicating static slot allocation

* libguile/goops.h (SCM_VTABLE_FLAG_GOOPS_STATIC_SLOT_ALLOCATION):
  Rename from SCM_VTABLE_FLAG_GOOPS_STATIC.
* libguile/goops.c (scm_init_goops_builtins): Adapt.
* module/oop/goops.scm (class-has-statically-allocated-slots?):
  (initialize): Adapt.
This commit is contained in:
Andy Wingo 2017-09-07 17:05:32 +02:00
parent 95f66b197c
commit 5c8bb13630
3 changed files with 7 additions and 7 deletions

View file

@ -1024,8 +1024,8 @@ scm_init_goops_builtins (void *unused)
scm_from_int (SCM_VTABLE_FLAG_GOOPS_VALID)); scm_from_int (SCM_VTABLE_FLAG_GOOPS_VALID));
scm_c_define ("vtable-flag-goops-slot", scm_c_define ("vtable-flag-goops-slot",
scm_from_int (SCM_VTABLE_FLAG_GOOPS_SLOT)); scm_from_int (SCM_VTABLE_FLAG_GOOPS_SLOT));
scm_c_define ("vtable-flag-goops-static", scm_c_define ("vtable-flag-goops-static-slot-allocation",
scm_from_int (SCM_VTABLE_FLAG_GOOPS_STATIC)); scm_from_int (SCM_VTABLE_FLAG_GOOPS_STATIC_SLOT_ALLOCATION));
} }
void void

View file

@ -43,7 +43,7 @@
#define SCM_VTABLE_FLAG_GOOPS_CLASS SCM_VTABLE_FLAG_GOOPS_0 #define SCM_VTABLE_FLAG_GOOPS_CLASS SCM_VTABLE_FLAG_GOOPS_0
#define SCM_VTABLE_FLAG_GOOPS_VALID SCM_VTABLE_FLAG_GOOPS_1 #define SCM_VTABLE_FLAG_GOOPS_VALID SCM_VTABLE_FLAG_GOOPS_1
#define SCM_VTABLE_FLAG_GOOPS_SLOT SCM_VTABLE_FLAG_GOOPS_2 #define SCM_VTABLE_FLAG_GOOPS_SLOT SCM_VTABLE_FLAG_GOOPS_2
#define SCM_VTABLE_FLAG_GOOPS_STATIC SCM_VTABLE_FLAG_GOOPS_3 #define SCM_VTABLE_FLAG_GOOPS_STATIC_SLOT_ALLOCATION SCM_VTABLE_FLAG_GOOPS_3
#define SCM_CLASS_OF(x) SCM_STRUCT_VTABLE (x) #define SCM_CLASS_OF(x) SCM_STRUCT_VTABLE (x)
#define SCM_CLASS_FLAGS(class) (SCM_VTABLE_FLAGS (class)) #define SCM_CLASS_FLAGS(class) (SCM_VTABLE_FLAGS (class))

View file

@ -280,7 +280,7 @@
(class-has-flags? (struct-vtable obj) vtable-flag-goops-class)) (class-has-flags? (struct-vtable obj) vtable-flag-goops-class))
(define (class-has-statically-allocated-slots? class) (define (class-has-statically-allocated-slots? class)
(class-has-flags? class vtable-flag-goops-static)) (class-has-flags? class vtable-flag-goops-static-slot-allocation))
;;; ;;;
;;; Now that we know the slots that must be present in classes, and ;;; Now that we know the slots that must be present in classes, and
@ -925,8 +925,8 @@ slots as we go."
;; Now that we're all done with that, mark <class> and <slot> as ;; Now that we're all done with that, mark <class> and <slot> as
;; static. ;; static.
(class-add-flags! <class> vtable-flag-goops-static) (class-add-flags! <class> vtable-flag-goops-static-slot-allocation)
(class-add-flags! <slot> vtable-flag-goops-static)) (class-add-flags! <slot> vtable-flag-goops-static-slot-allocation))
@ -2821,7 +2821,7 @@ var{initargs}."
(match (filter class-has-statically-allocated-slots? (match (filter class-has-statically-allocated-slots?
(class-precedence-list class)) (class-precedence-list class))
(() (()
(class-add-flags! class vtable-flag-goops-static)) (class-add-flags! class vtable-flag-goops-static-slot-allocation))
(classes (classes
(error "Class has superclasses with static slot allocation" classes)))) (error "Class has superclasses with static slot allocation" classes))))
(struct-set! class class-index-direct-slots (struct-set! class class-index-direct-slots