[svn-commits] eliel: branch group/data_api_gsoc2009 r201228 - /team/group/data_api_gsoc2009...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 16 18:09:31 CDT 2009


Author: eliel
Date: Tue Jun 16 18:09:28 2009
New Revision: 201228

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201228
Log:
Use a union to store node data.

Modified:
    team/group/data_api_gsoc2009/main/data.c

Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=201228&r1=201227&r2=201228
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Tue Jun 16 18:09:28 2009
@@ -37,9 +37,13 @@
            managed by functions local to this file. */
 struct ast_data {
 	enum ast_data_type type;
-	char *name;
+	union {
+		unsigned int boolean:1;
+		int integer;
+		char *string;
+	} payload;
 	struct ao2_container *children;
-	char data[0];
+	char name[0];
 };
 
 /*! \brief A data container node pointing to the registered handler. */




More information about the svn-commits mailing list