[svn:parrot] r47257 - branches/gsoc_nfg/src/string

darbelo at svn.parrot.org darbelo at svn.parrot.org
Tue Jun 1 15:52:55 UTC 2010


Author: darbelo
Date: Tue Jun  1 15:52:54 2010
New Revision: 47257
URL: https://trac.parrot.org/parrot/changeset/47257

Log:
Move the grapheme table definition into grapeheme.h

Modified:
   branches/gsoc_nfg/src/string/grapheme.h

Modified: branches/gsoc_nfg/src/string/grapheme.h
==============================================================================
--- branches/gsoc_nfg/src/string/grapheme.h	Tue Jun  1 15:03:21 2010	(r47256)
+++ branches/gsoc_nfg/src/string/grapheme.h	Tue Jun  1 15:52:54 2010	(r47257)
@@ -17,6 +17,21 @@
 
 typedef struct grapheme_t grapheme;
 
+#define MIN_TABLE_LENGTH 1
+
+struct grapheme_table_t {
+    UINTVAL size; /* Total table size, in graphemes. */
+    UINTVAL used; /* Number of slots used from the table. */
+    grapheme graphemes[MIN_TABLE_LENGTH];
+    /*
+     * Not really a static array. When we need a bigger table, we just allocate
+     * a bigger structure and keep going after the 'end' of the array.
+     */
+};
+
+typedef struct grapheme_table_t grapheme_table;
+
+
 #endif /* PARROT_HAS_ICU */
 #endif /* PARROT_GRAPHEME_H_GUARD */
 


More information about the parrot-commits mailing list