Removing unneccessary mutation
svn: r12381
This commit is contained in:
parent
ad75c8aa58
commit
3c51e88785
|
@ -7,32 +7,25 @@
|
|||
|
||||
; configuration-table = (make-configuration-table nat nat num host-table (listof (cons str host-table)))
|
||||
(define-struct configuration-table
|
||||
(port max-waiting initial-connection-timeout default-host virtual-hosts)
|
||||
#:mutable)
|
||||
(port max-waiting initial-connection-timeout default-host virtual-hosts))
|
||||
|
||||
; host-table = (make-host-table (listof str) sym messages timeouts paths)
|
||||
(define-struct host-table (indices log-format messages timeouts paths)
|
||||
#:mutable)
|
||||
(define-struct host-table (indices log-format messages timeouts paths))
|
||||
|
||||
(define-struct host (indices log-format log-path passwords responders timeouts paths)
|
||||
#:mutable)
|
||||
(define-struct host (indices log-format log-path passwords responders timeouts paths))
|
||||
|
||||
(define-struct responders
|
||||
(servlet servlet-loading authentication servlets-refreshed passwords-refreshed file-not-found protocol collect-garbage)
|
||||
#:mutable)
|
||||
(servlet servlet-loading authentication servlets-refreshed passwords-refreshed file-not-found protocol collect-garbage))
|
||||
|
||||
; messages = (make-messages str^6)
|
||||
(define-struct messages
|
||||
(servlet authentication servlets-refreshed passwords-refreshed file-not-found protocol collect-garbage)
|
||||
#:mutable)
|
||||
(servlet authentication servlets-refreshed passwords-refreshed file-not-found protocol collect-garbage))
|
||||
|
||||
; timeouts = (make-timeouts nat^5)
|
||||
(define-struct timeouts (default-servlet password servlet-connection file-per-byte file-base)
|
||||
#:mutable)
|
||||
(define-struct timeouts (default-servlet password servlet-connection file-per-byte file-base))
|
||||
|
||||
; paths = (make-paths str^6)
|
||||
(define-struct paths (conf host-base log htdocs servlet mime-types passwords)
|
||||
#:mutable)
|
||||
(define-struct paths (conf host-base log htdocs servlet mime-types passwords))
|
||||
|
||||
(provide/contract
|
||||
[struct configuration-table
|
||||
|
|
|
@ -6,13 +6,10 @@
|
|||
adjust-timeout!
|
||||
clear-continuations!
|
||||
continuation-store!
|
||||
continuation-lookup)
|
||||
#:mutable)
|
||||
continuation-lookup))
|
||||
|
||||
(define-struct (exn:fail:servlet-manager:no-instance exn:fail) (expiration-handler)
|
||||
#:mutable)
|
||||
(define-struct (exn:fail:servlet-manager:no-continuation exn:fail) (expiration-handler)
|
||||
#:mutable)
|
||||
(define-struct (exn:fail:servlet-manager:no-instance exn:fail) (expiration-handler))
|
||||
(define-struct (exn:fail:servlet-manager:no-continuation exn:fail) (expiration-handler))
|
||||
|
||||
(provide/contract
|
||||
[struct manager ([create-instance ((-> void) . -> . number?)]
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#lang scheme/base
|
||||
(require mzlib/contract)
|
||||
|
||||
(define-struct cache-table (hash semaphore)
|
||||
#:mutable)
|
||||
(define-struct cache-table (hash semaphore) #:mutable)
|
||||
|
||||
(define (new-cache-table)
|
||||
; Only eq? tables are not locked
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
|
||||
(define TEXT/HTML-MIME-TYPE #"text/html; charset=utf-8")
|
||||
|
||||
(define-struct response/basic (code message seconds mime headers)
|
||||
#:mutable)
|
||||
(define-struct (response/full response/basic) (body)
|
||||
#:mutable)
|
||||
(define-struct (response/incremental response/basic) (generator)
|
||||
#:mutable)
|
||||
(define-struct response/basic (code message seconds mime headers))
|
||||
(define-struct (response/full response/basic) (body))
|
||||
(define-struct (response/incremental response/basic) (generator))
|
||||
|
||||
; response = (cons string (listof string)), where the first string is a mime-type
|
||||
; | x-expression
|
||||
|
|
|
@ -5,12 +5,10 @@
|
|||
"../private/response-structs.ss")
|
||||
|
||||
(define servlet-prompt (make-continuation-prompt-tag 'servlet))
|
||||
(define-struct (exn:fail:servlet:instance exn:fail) ()
|
||||
#:mutable)
|
||||
(define-struct (exn:fail:servlet:instance exn:fail) ())
|
||||
(define-struct servlet (custodian namespace manager directory handler)
|
||||
#:mutable)
|
||||
(define-struct execution-context (request)
|
||||
#:mutable)
|
||||
(define-struct execution-context (request))
|
||||
|
||||
(define current-servlet (make-parameter #f))
|
||||
(define current-servlet-instance-id (make-parameter #f))
|
||||
|
|
Loading…
Reference in New Issue
Block a user