* src/vmcore/field.c (field_get_annotations): Always enable the
[cacao.git] / src / vmcore / field.c
index 5cd1a6e6cc90a95132cb41a87fdc37ee12b01f0d..f2fa08d68b9da35b8d173b30e132b2e7c247a825 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: field.c 8315 2007-08-15 22:49:20Z panzi $
+   $Id: field.c 8325 2007-08-16 17:25:47Z twisti $
 
 */
 
@@ -386,19 +386,23 @@ void field_free(fieldinfo *f)
 }
 
 
-#if defined(ENABLE_ANNOTATIONS)
 /* field_get_annotations ******************************************************
 
    Gets a fields' annotations (or NULL if none).
 
 *******************************************************************************/
 
-java_bytearray *field_get_annotations(fieldinfo *f)
+java_handle_bytearray_t *field_get_annotations(fieldinfo *f)
 {
-       classinfo              *c           = f->class;
-       int                     slot        = f - c->fields;
-       annotation_bytearray_t *ba          = NULL;
-       java_bytearray         *annotations = NULL;
+#if defined(ENABLE_ANNOTATIONS)
+       classinfo               *c;
+       int                      slot;
+       annotation_bytearray_t  *ba;
+       java_handle_bytearray_t *annotations;
+
+       c           = f->class;
+       slot        = f - c->fields;
+       annotations = NULL;
        
        if (c->field_annotations != NULL && c->field_annotations->size > slot) {
                ba = c->field_annotations->data[slot];
@@ -413,8 +417,10 @@ java_bytearray *field_get_annotations(fieldinfo *f)
        }
        
        return annotations;
-}
+#else
+       return NULL;
 #endif
+}
 
 
 /* field_printflags ************************************************************