summaryrefslogtreecommitdiff
path: root/ext/ffi_c/Struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi_c/Struct.h')
-rw-r--r--ext/ffi_c/Struct.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/ffi_c/Struct.h b/ext/ffi_c/Struct.h
index 1cba8bb..8e9491b 100644
--- a/ext/ffi_c/Struct.h
+++ b/ext/ffi_c/Struct.h
@@ -78,11 +78,12 @@ extern "C" {
* This avoids full ruby hash lookups for repeated lookups.
*/
#define FIELD_CACHE_LOOKUP(this, sym) ( &(this)->cache_row[((sym) >> 8) & 0xff] )
+ #define FIELD_CACHE_ROWS 0x100
struct field_cache_entry {
VALUE fieldName;
StructField *field;
- } cache_row[0x100];
+ } cache_row[FIELD_CACHE_ROWS];
/** The number of reference tracking fields in this struct */
int referenceFieldCount;