Commits

David Beach  committed 6ac1b96

* Changed "type" column (stores BSON typecode) to use uint8 storage. This is more compact, and better reflects the BSON specification.

  • Participants
  • Parent commits f0e0dc8

Comments (0)

Files changed (2)

File monary/cmonary.c

     TYPE_TIMESTAMP = 10, // BSON timestamp (int64 storage)
     TYPE_STRING = 11,    // each record is (type_arg) chars in length
     TYPE_BINARY = 12,    // each record is (type_arg) bytes in length
-    TYPE_TYPE = 13,      // BSON type code (int32 storage)
+    TYPE_TYPE = 13,      // BSON type code (uint8 storage)
     TYPE_LENGTH = 14,    // length of string, symbol, binary, or bson object: int32 storage
     LAST_TYPE = 14,
 };
                                   monary_column_item* citem,
                                   int idx)
 {
-    ((INT32*) citem->storage)[idx] = type;
+    ((unsigned char*) citem->storage)[idx] = type;
     return 1;
 }
 

File monary/monary.py

     "timestamp": (10, numpy.int64),
     "string":    (11, "a"),
     "binary":    (12, "V"),
-    "type":      (13, numpy.int32),
+    "type":      (13, numpy.uint8),
     "length":    (14, numpy.int32),
 }