Re: Updating prototypes for sasl_malloc_t/sasl_calloc_t/.. to use size_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexey Melnikov wrote:
I would like to update prototypes for sasl_malloc_t and friends in
sasl.h to use size_t. Current prototypes are invalid, in particular on
64 bit Windows. Any concerns about this change?

Sounds like a good idea, and necessary regardless.

diff --git a/include/sasl.h b/include/sasl.h
index 5bbbbfb..2ac5300 100755
--- a/include/sasl.h
+++ b/include/sasl.h
@@ -225,9 +225,9 @@ extern "C" {

   /* memory allocation functions which may optionally be replaced:
    */
-typedef void *sasl_malloc_t(unsigned long);
-typedef void *sasl_calloc_t(unsigned long, unsigned long);
-typedef void *sasl_realloc_t(void *, unsigned long);
+typedef void *sasl_malloc_t(size_t);
+typedef void *sasl_calloc_t(size_t, size_t);
+typedef void *sasl_realloc_t(void *, size_t);
   typedef void sasl_free_t(void *);

   LIBSASL_API void sasl_set_alloc(sasl_malloc_t *,




--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/




[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux