mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
Infrastructure for internal use by the LDAP code. a=r=(not built)
This commit is contained in:
parent
deecc5b1fd
commit
f6b8f75202
21
directory/xpcom/base/src/nsLDAPInternal.h
Normal file
21
directory/xpcom/base/src/nsLDAPInternal.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
*/
|
||||
#include "nsLDAP.h"
|
||||
#include "nspr.h"
|
||||
|
||||
// frees all elements of an XPIDL out array of a given size using
|
||||
// freeFunc(), then frees the array itself using nsMemory::Free().
|
||||
// Thanks to <alecf@netscape.com> for suggesting this form, which can be
|
||||
// used to NS_RELEASE entire arrays before freeing as well.
|
||||
//
|
||||
#define NSLDAP_FREE_XPIDL_ARRAY(size, array, freeFunc) \
|
||||
for ( PRUint32 __iter__ = (size) ; __iter__ > 0 ; ) \
|
||||
freeFunc((array)[--__iter__]); \
|
||||
nsMemory::Free(array);
|
||||
|
||||
// XXXdmose should this really be DEBUG-only?
|
||||
//
|
||||
#ifdef DEBUG
|
||||
extern PRLogModuleInfo *gLDAPLogModule; // defn in nsLDAPProtocolModule.cpp
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user