Corrected type asn1_static_node_t -> asn1_static_node.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 1 Nov 2012 14:21:49 +0000 (15:21 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 1 Nov 2012 14:23:07 +0000 (15:23 +0100)
The old type was left for compatibility. Reported by Andreas Metzler.

NEWS
lib/libtasn1.h
lib/structure.c
tests/Test_tree_asn1_tab.c

diff --git a/NEWS b/NEWS
index 7ab3347..d2503bb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 GNU Libtasn1 NEWS                                     -*- outline -*-
 
+* Noteworthy changes in release 3.1 (unreleased) [stable]
+- Completed rename of types:
+  ASN1_ARRAY_TYPE -> asn1_static_node (was asn1_static_node_t)
+
 * Noteworthy changes in release 3.0 (2012-10-28) [stable]
 - Added tool in tests/ to benchmark X.509 structure decoding.
 - Added asn1_read_node_value() to obtain a node's value.
index 5be46d0..c80a5ca 100644 (file)
@@ -124,7 +124,7 @@ extern "C"
     unsigned int type;         /* Node type */
     const void *value;         /* Node value */
   };
-  typedef struct asn1_static_node_st asn1_static_node_t;
+  typedef struct asn1_static_node_st asn1_static_node;
 
 /* List of constants for field type of typedef node_asn  */
 #define ASN1_ETYPE_CONSTANT       1
@@ -183,7 +183,7 @@ extern "C"
                       const char *vectorName, char *errorDescription);
 
   extern ASN1_API int
-    asn1_array2tree (const asn1_static_node_t * array,
+    asn1_array2tree (const asn1_static_node * array,
                     asn1_node * definitions, char *errorDescription);
 
   extern ASN1_API void
@@ -307,7 +307,8 @@ typedef int asn1_retCode;   /* type returned by libtasn1 functions */
 #define ASN1_TYPE_EMPTY NULL
 
 #define static_struct_asn asn1_static_node_st
-#define ASN1_ARRAY_TYPE asn1_static_node_t
+#define ASN1_ARRAY_TYPE asn1_static_node
+#define asn1_static_node_t asn1_static_node
 
 #define node_data_struct asn1_data_node_st
 #define ASN1_DATA_NODE asn1_data_node_st
index 4613d06..32be50b 100644 (file)
@@ -96,7 +96,7 @@ _asn1_create_static_structure (asn1_node pointer, char *output_file_name,
 
   fprintf (file, "#include <libtasn1.h>\n\n");
 
-  fprintf (file, "const asn1_static_node_t %s[] = {\n", vector_name);
+  fprintf (file, "const asn1_static_node %s[] = {\n", vector_name);
 
   p = pointer;
 
@@ -174,7 +174,7 @@ _asn1_create_static_structure (asn1_node pointer, char *output_file_name,
  *   %ASN1_ARRAY_ERROR if the array pointed by @array is wrong.
  **/
 int
-asn1_array2tree (const asn1_static_node_t * array, asn1_node * definitions,
+asn1_array2tree (const asn1_static_node * array, asn1_node * definitions,
                 char *errorDescription)
 {
   asn1_node p, p_last = NULL;
index 9866eab..3d406d1 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <libtasn1.h>
 
-const asn1_static_node_t Test_tree_asn1_tab[] = {
+const asn1_static_node Test_tree_asn1_tab[] = {
   { "TEST_TREE", 536875024, NULL },
   { NULL, 1610612748, NULL },
   { "iso", 1073741825, "1"},