Rev 3886 | Rev 4192 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3886 | Rev 3901 | ||
---|---|---|---|
Line 126... | Line 126... | ||
126 | field->size = 2; \ |
126 | field->size = 2; \ |
127 | field->next = 0; \ |
127 | field->next = 0; \ |
128 | field->items = ( type ** ) malloc( sizeof( type * ) * field->size ); \ |
128 | field->items = ( type ** ) malloc( sizeof( type * ) * field->size ); \ |
129 | if( ! field->items ) return ENOMEM; \ |
129 | if( ! field->items ) return ENOMEM; \ |
130 | field->items[ field->next ] = NULL; \ |
130 | field->items[ field->next ] = NULL; \ |
131 | field->magic = INT_MAP_MAGIC_VALUE; \ |
131 | field->magic = GENERIC_FIELD_MAGIC_VALUE; \ |
132 | return EOK; \ |
132 | return EOK; \ |
133 | } \ |
133 | } \ |
134 | \ |
134 | \ |
135 | int name##_is_valid( name##_ref field ){ \ |
135 | int name##_is_valid( name##_ref field ){ \ |
136 | return field && ( field->magic == INT_MAP_MAGIC_VALUE ); \ |
136 | return field && ( field->magic == GENERIC_FIELD_MAGIC_VALUE ); \ |
137 | } |
137 | } |
138 | 138 | ||
139 | #endif |
139 | #endif |
140 | 140 | ||
141 | /** @} |
141 | /** @} |