From cd2e6cff48b8d1137df2b71aee81c6cecf4953c2 Mon Sep 17 00:00:00 2001 From: eknauel Date: Fri, 13 Feb 2004 16:58:37 +0000 Subject: [PATCH] got rid of some record types: ldap-entry ldap-result. It makes no sense to put diffrent types of ldap-messages (they all live in a single type LDAPMessage on the evil C side) in appropriate records since the type of a ldap-message keeps changing in an unpredictable way. Use the API call ldap-message-type instead. --- scheme/types.scm | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/scheme/types.scm b/scheme/types.scm index f6dac72..79757cb 100644 --- a/scheme/types.scm +++ b/scheme/types.scm @@ -1,10 +1,9 @@ (define-record-type ldap-session :ldap-session - (make-ldap-session c-pointer bound? options messages) + (make-ldap-session c-pointer bound? options) ldap-session? (c-pointer ldap-session-c-pointer) (bound? ldap-session-bound? set-ldap-session-bound?!) - (options ldap-session-options set-ldap-session-options!) - (messages ldap-session-messages set-ldap-session-messages!)) + (options ldap-session-options set-ldap-session-options!)) (define-exported-binding "ldap-session" :ldap-session) @@ -20,22 +19,16 @@ (define (ldap-session-auto-unbind? session) (session-options-auto-unbind? (ldap-session-options session))) -(define (ldap-session-messages-adjoin! session message) - (set-ldap-session-messages! - session (lset-adjoin eq? (ldap-session-messages session) message))) - -(define (ldap-session-messages-member? session message) - (memq message (ldap-session-messages session))) - (define (ldap-session=? session-a session-b) (equal? (ldap-session-c-pointer session-a) (ldap-session-c-pointer session-b))) ;;; This is the basic type (define-record-type ldap-message :ldap-message - (make-ldap-message c-pointer) + (make-ldap-message c-pointer session) ldap-message? - (c-pointer ldap-message-c-pointer)) + (c-pointer ldap-message-c-pointer) + (session ldap-message-session set-ldap-message-session!)) (define-exported-binding "ldap-message" :ldap-message) @@ -43,18 +36,6 @@ (equal? (ldap-message-c-pointer session-a) (ldap-message-c-pointer session-b))) -;;; The C api does not distinguish ldap-message, ldap-entry and -;;; ldap-attribute as types, they all have the type LDAPMessage. We -;;; do. -(define-record-type ldap-entry :ldap-entry - (make-ldap-entry message) - ldap-entry? - (message ldap-entry-message)) - -(define (ldap-entry=? entry-a entry-b) - (ldap-message=? (ldap-entry-message entry-a) - (ldap-entry-message entry-b))) - (define-record-type ldap-modification :ldap-modification (make-ldap-modification c-pointer) ldap-modification?