[gjs: 2/8] boxed: Remove limitation of 256 fields



commit 62f43435789209fa36058fd9fbeabc89a4634b2a
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat May 12 12:21:22 2018 -0700

    boxed: Remove limitation of 256 fields
    
    This limitation came from using TinyIDs in previous versions of
    SpiderMonkey, which were 8 bits. They don't exist anymore, and we use
    regular 32-bit ints for this purpose.

 gi/boxed.cpp | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 6fb6c66b..05f60dc1 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -838,12 +838,6 @@ define_boxed_class_fields(JSContext       *cx,
      * as well if doing it ahead of time caused to much start-up
      * memory overhead.
      */
-    if (n_fields > 256) {
-        g_warning("Only defining the first 256 fields in boxed type '%s'",
-                  g_base_info_get_name ((GIBaseInfo *)priv->info));
-        n_fields = 256;
-    }
-
     for (i = 0; i < n_fields; i++) {
         GIFieldInfo *field = g_struct_info_get_field (priv->info, i);
         const char *field_name = g_base_info_get_name ((GIBaseInfo *)field);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]