615c7109a2b74936d75c3a2366a7eda87a9d15a3
[cacao.git] / src / native / vm / gnu / java_security_VMAccessController.c
1 /* src/native/vm/gnu/java_security_VMAccessController.c
2
3    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25    $Id: java_security_VMAccessController.c 8318 2007-08-16 10:05:34Z michi $
26
27 */
28
29
30 #include "config.h"
31 #include "vm/types.h"
32
33 #include "native/jni.h"
34 #include "native/native.h"
35
36 #include "native/include/java_security_VMAccessController.h"
37
38 #include "vm/builtin.h"
39
40 #include "vm/jit/stacktrace.h"
41
42 #include "vmcore/class.h"
43 #include "vmcore/options.h"
44
45
46 /* native methods implemented by this file ************************************/
47
48 static JNINativeMethod methods[] = {
49         { "getStack", "()[[Ljava/lang/Object;", (void *) (ptrint) &Java_java_security_VMAccessController_getStack },
50 };
51
52
53 /* _Jv_java_security_VMAccessController_init ***********************************
54
55    Register native functions.
56
57 *******************************************************************************/
58
59 void _Jv_java_security_VMAccessController_init(void)
60 {
61         utf *u;
62
63         u = utf_new_char("java/security/VMAccessController");
64
65         native_method_register(u, methods, NATIVE_METHODS_COUNT);
66 }
67
68
69 /*
70  * Class:     java/security/VMAccessController
71  * Method:    getStack
72  * Signature: ()[[Ljava/lang/Object;
73  */
74 JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_security_VMAccessController_getStack(JNIEnv *env, jclass clazz)
75 {
76         return stacktrace_getStack();
77 }
78
79
80 /*
81  * These are local overrides for various environment variables in Emacs.
82  * Please do not remove this and leave it at the end of the file, where
83  * Emacs will automagically detect them.
84  * ---------------------------------------------------------------------
85  * Local variables:
86  * mode: c
87  * indent-tabs-mode: t
88  * c-basic-offset: 4
89  * tab-width: 4
90  * End:
91  */