1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
12 #include "sjme/nvm/allocSizeOf.h"
13 #include "frontend/emulator/jniHelper.h"
15 jint
SJME_JNI_METHOD(SJME_CLASS_ALLOC_SIZEOF
, _1_1size
)
16 (JNIEnv
* env
, jclass classy
, jint id
, jint count
)
21 /* Calculate the size. */
23 if (sjme_error_is(error
= sjme_alloc_sizeOf(id
, count
, &result
)) ||
26 sjme_jni_throwVMException(env
, error
);
30 /* Use the given result. */