Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : libast

Dir     : eterm/libast/include/libast


Modified Files:
        types.h.in 


Log Message:
Wed Jul 21 22:48:14 2004                        Michael Jennings (mej)

More cleanups and fixed compile problems.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/include/libast/types.h.in,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- types.h.in  16 Jul 2004 23:22:18 -0000      1.20
+++ types.h.in  22 Jul 2004 02:49:50 -0000      1.21
@@ -119,8 +119,8 @@
  * Obtain the size of a type from its basename.
  *
  * This macro returns the size of the given type basename (such as
- * "obj" or "charptr" or "uint8").  This is primarily used for objects
- * and other structures whose types are actually struct pointers.
+ * "obj" or "str").  This is only used for objects and other
+ * structures whose types are actually struct pointers.
  *
  * @param type The type basename.
  * @return     The size of objects/structures of that type.
@@ -608,6 +608,28 @@
  */
 typedef spif_charptr_t spif_classname_t;
 
+/**
+ * Convenience macro for typecasting to spif_charptr_t.
+ *
+ * This macro typecasts a value to a spif_charptr_t.  I got really
+ * tired of typing "SPIF_CAST(charptr)" all the time, especially for
+ * string constants. :-)
+ *
+ * @see @link DOXGRP_TYPES Portable Data Types @endlink, SPIF_CAST(), spif_charptr_t
+ */
+#define SPIF_CHARPTR(var)    (SPIF_CAST(charptr) (var))
+
+/**
+ * Convenience macro for typecasting to C's default char * type.
+ *
+ * This macro typecasts a value to whatever "char *" is on the current
+ * system.  This is used to typecast a spif_charptr_t back to the
+ * native C type for use in standard libc functions.
+ *
+ * @see @link DOXGRP_TYPES Portable Data Types @endlink, SPIF_CAST(), spif_charptr_t
+ */
+#define SPIF_CHARPTR_C(var)  (SPIF_CAST_C(char *) (var))
+
 /[EMAIL PROTECTED]/
 
 /[EMAIL PROTECTED]/




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to