[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: Re: [Help-smalltalk] Re: Calling LDAP C API from Smalltalk]
From: |
Stephen Woolerton |
Subject: |
[Fwd: Re: [Help-smalltalk] Re: Calling LDAP C API from Smalltalk] |
Date: |
Fri, 16 Jan 2009 12:46:21 +1300 |
User-agent: |
Thunderbird 2.0.0.19 (Macintosh/20081209) |
.. an email that didn't get copied to the list (from Paolo to me)
-------- Original Message --------
Subject: Re: [Help-smalltalk] Re: Calling LDAP C API from Smalltalk
Date: Sun, 28 Sep 2008 13:56:08 +0200
From: Paolo Bonzini <address@hidden>
To: Stephen Woolerton <address@hidden>
References: <address@hidden>
<address@hidden> <address@hidden>
<address@hidden> <address@hidden>
<address@hidden> <address@hidden>
<address@hidden> <address@hidden>
<address@hidden>
It is rather ironic that the reason I began this exercise was to work
with mail routing on an LDAP server! The very attribute that won't
display the value :-).
I don't understand, did the C program work? :-)
CObject subclass: BER [
" -----------------------
LBER_F( void )
ber_free LDAP_P((
BerElement *ber,
int freebuf ));
------------------------- "
BER class >> free [
<cCall: 'ber_free' returning: #void args: #(#self #int)>
]
]
Why is this a class method? You should have done something like
free: arg [
<cCall: 'ber_free' returning: #void args: #(#self #int)>
]
free [ self free: 0]
and likewise:
CObject subclass: LDAPMessage [
LDAPMessage class >> free [
<cCall: 'ldap_msgfree' returning: #int args: #(#self)>
]
]
This should also use an instance-side method.
Now it would be a nice exercise to turn it into a more Smalltalk-like API.
Paolo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fwd: Re: [Help-smalltalk] Re: Calling LDAP C API from Smalltalk],
Stephen Woolerton <=