Fixed SILC_PTR_TO_64
[silc.git] / lib / silcutil / silctypes.h
index fbbc6d1dba22e736b61d3fea5863231f19ccada3..1e7639ce879a9f255c57a261ef176f7ab12873ee 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 - 2004 Pekka Riikonen
+  Copyright (C) 2002 - 2006 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 #endif
 /***/
 
+/****d* silcutil/SILCTypes/SilcBool
+ *
+ * NAME
+ *
+ *    typedef unigned char SilcBool;
+ *
+ * DESCRIPTION
+ *
+ *    Boolean value, and is always 8-bits.  Represents value 0 or 1.
+ *
+ ***/
+typedef unsigned char SilcBool;
+
 /****d* silcutil/SILCTypes/bool
  *
  * NAME
  *
- *    #define bool ...
+ *    #define SilcBool ...
  *
  * DESCRIPTION
  *
 #endif
 /***/
 
-/****d* silcutil/SILCTypes/SilcBool
- *
- * NAME
- *
- *    typedef unigned char SilcBool;
- *
- * DESCRIPTION
- *
- *    Boolean value, and is always 8-bits.  Represents value 0 or 1.
- *
- ***/
-typedef unigned char SilcBool;
-
 #define silc_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 
 #if SILC_SIZEOF_SHORT > 2
@@ -551,8 +551,7 @@ do {                                                \
 #if SILC_SIZEOF_VOID_P < 8
 #define SILC_PTR_TO_64(_ptr__) ((SilcUInt64)((SilcUInt32)(_ptr__)))
 #else
-#define SILC_PTR_TO_64(_ptr__)                                                 \
-  ((SilcUInt64)((SilcUInt64)(_ptr__) & (SilcUInt32)0xFFFFFFFFUL))
+#define SILC_PTR_TO_64(_ptr__) ((SilcUInt64)((SilcUInt64)(_ptr__)))
 #endif
 /***/
 
@@ -560,7 +559,7 @@ do {                                                \
  *
  * NAME
  *
- *    #define SILC_PTR_TO_32 ...
+ *    #define SILC_32_TO_PTR ...
  *
  * DESCRIPTION
  *
@@ -581,7 +580,7 @@ do {                                                \
  *
  * NAME
  *
- *    #define SILC_PTR_TO_64 ...
+ *    #define SILC_64_TO_PTR ...
  *
  * DESCRIPTION
  *