1 // javaprims.h - Main external header file for libgcj. -*- c++ -*-
4 /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
5 Free Software Foundation
7 This file is part of libgcj.
9 This software is copyrighted work licensed under the terms of the
10 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
13 #ifndef __JAVAPRIMS_H__
14 #define __JAVAPRIMS_H__
16 // Force C++ compiler to use Java-style exceptions.
17 #pragma GCC java_exceptions
19 #include <gcj/libgcj-config.h>
21 // FIXME: this is a hack until we get a proper gcjh.
22 // It is needed to work around system header files that define TRUE
29 // To force selection of correct types that will mangle consistently
33 typedef __java_byte jbyte
;
34 typedef __java_short jshort
;
35 typedef __java_int jint
;
36 typedef __java_long jlong
;
37 typedef __java_float jfloat
;
38 typedef __java_double jdouble
;
39 typedef __java_char jchar
;
40 typedef __java_boolean jboolean
;
43 // The following class declarations are automatically generated by
44 // the `classes.pl' script.
49 class BufferedInputStream
;
50 class BufferedOutputStream
;
53 class ByteArrayInputStream
;
54 class ByteArrayOutputStream
;
55 class CharArrayReader
;
56 class CharArrayWriter
;
57 class CharConversionException
;
60 class DataInputStream
;
62 class DataOutputStream
;
63 class DeleteFileHelper
;
64 class DeleteFileHelper$
1;
70 class FileInputStream
;
71 class FileNotFoundException
;
72 class FileOutputStream
;
77 class FilterInputStream
;
78 class FilterOutputStream
;
84 class InputStreamReader
;
85 class InterruptedIOException
;
86 class InvalidClassException
;
87 class InvalidObjectException
;
88 class LineNumberInputStream
;
89 class LineNumberReader
;
90 class NotActiveException
;
91 class NotSerializableException
;
93 class ObjectInputStream
;
94 class ObjectInputStream$
1;
95 class ObjectInputStream$
2;
96 class ObjectInputStream$GetField
;
97 class ObjectInputStream$ValidatorAndPriority
;
98 class ObjectInputValidation
;
100 class ObjectOutputStream
;
101 class ObjectOutputStream$
1;
102 class ObjectOutputStream$PutField
;
103 class ObjectStreamClass
;
104 class ObjectStreamClass$
1;
105 class ObjectStreamClass$
2;
106 class ObjectStreamClass$InterfaceComparator
;
107 class ObjectStreamClass$MemberComparator
;
108 class ObjectStreamConstants
;
109 class ObjectStreamException
;
110 class ObjectStreamField
;
111 class ObjectStreamField$
1;
112 class OptionalDataException
;
114 class OutputStreamWriter
;
115 class PipedInputStream
;
116 class PipedOutputStream
;
121 class PushbackInputStream
;
122 class PushbackReader
;
123 class RandomAccessFile
;
125 class SequenceInputStream
;
127 class SerializablePermission
;
128 class StreamCorruptedException
;
129 class StreamTokenizer
;
130 class StringBufferInputStream
;
133 class SyncFailedException
;
134 class UTFDataFormatException
;
135 class UnsupportedEncodingException
;
136 class VMObjectInputStream
;
137 class VMObjectStreamClass
;
138 class WriteAbortedException
;
144 class AbstractMethodError
;
146 class ArithmeticException
;
147 class ArrayIndexOutOfBoundsException
;
148 class ArrayStoreException
;
149 class AssertionError
;
154 class Character$Subset
;
155 class Character$UnicodeBlock
;
157 class ClassCastException
;
158 class ClassCircularityError
;
159 class ClassFormatError
;
161 class ClassLoader$AnnotationsKey
;
162 class ClassNotFoundException
;
163 class CloneNotSupportedException
;
171 class EnumConstantNotPresentException
;
174 class ExceptionInInitializerError
;
176 class IllegalAccessError
;
177 class IllegalAccessException
;
178 class IllegalArgumentException
;
179 class IllegalMonitorStateException
;
180 class IllegalStateException
;
181 class IllegalThreadStateException
;
182 class IncompatibleClassChangeError
;
183 class IndexOutOfBoundsException
;
184 class InheritableThreadLocal
;
185 class InstantiationError
;
186 class InstantiationException
;
189 class InterruptedException
;
194 class NegativeArraySizeException
;
195 class NoClassDefFoundError
;
196 class NoSuchFieldError
;
197 class NoSuchFieldException
;
198 class NoSuchMethodError
;
199 class NoSuchMethodException
;
200 class NullPointerException
;
202 class NumberFormatException
;
204 class OutOfMemoryError
;
208 class PosixProcess$EOFInputStream
;
209 class PosixProcess$ProcessManager
;
211 class ProcessBuilder
;
215 class RuntimeException
;
216 class RuntimePermission
;
217 class SecurityException
;
218 class SecurityManager
;
219 class SecurityManager$
1;
221 class StackOverflowError
;
222 class StackTraceElement
;
225 class String$CaseInsensitiveComparator
;
228 class StringIndexOutOfBoundsException
;
229 class SuppressWarnings
;
231 class System$EnvironmentCollection
;
232 class System$EnvironmentMap
;
233 class System$EnvironmentSet
;
236 class Thread$UncaughtExceptionHandler
;
241 class Throwable$StaticData
;
242 class TypeNotPresentException
;
244 class UnsatisfiedLinkError
;
245 class UnsupportedClassVersionError
;
246 class UnsupportedOperationException
;
254 class VirtualMachineError
;
260 class AnnotationFormatError
;
261 class AnnotationTypeMismatchException
;
264 class IncompleteAnnotationException
;
267 class RetentionPolicy
;
273 class ClassDefinition
;
274 class ClassFileTransformer
;
275 class IllegalClassFormatException
;
276 class Instrumentation
;
277 class UnmodifiableClassException
;
282 class ClassLoadingMXBean
;
283 class CompilationMXBean
;
284 class GarbageCollectorMXBean
;
285 class ManagementFactory
;
286 class ManagementPermission
;
288 class MemoryManagerMXBean
;
289 class MemoryNotificationInfo
;
290 class MemoryPoolMXBean
;
293 class OperatingSystemMXBean
;
297 class VMManagementFactory
;
302 class PhantomReference
;
304 class ReferenceQueue
;
311 class AccessibleObject
;
312 class AnnotatedElement
;
316 class GenericArrayType
;
317 class GenericDeclaration
;
318 class GenericSignatureFormatError
;
319 class InvocationHandler
;
320 class InvocationTargetException
;
321 class MalformedParameterizedTypeException
;
325 class ParameterizedType
;
327 class Proxy$ClassFactory
;
328 class Proxy$ProxyData
;
329 class Proxy$ProxySignature
;
330 class Proxy$ProxyType
;
331 class ReflectPermission
;
334 class UndeclaredThrowableException
;
342 class AbstractCollection
;
344 class AbstractList$
1;
345 class AbstractList$
2;
346 class AbstractList$
3;
347 class AbstractList$RandomAccessSubList
;
348 class AbstractList$SubList
;
354 class AbstractMap$SimpleEntry
;
355 class AbstractMap$SimpleImmutableEntry
;
357 class AbstractSequentialList
;
360 class ArrayDeque$DeqIterator
;
361 class ArrayDeque$DescendingIterator
;
364 class Arrays$ArrayList
;
370 class Collections$
1$SynchronizedMapEntry
;
379 class Collections$CheckedCollection
;
380 class Collections$CheckedIterator
;
381 class Collections$CheckedList
;
382 class Collections$CheckedListIterator
;
383 class Collections$CheckedMap
;
384 class Collections$CheckedMap$CheckedEntrySet
;
385 class Collections$CheckedRandomAccessList
;
386 class Collections$CheckedSet
;
387 class Collections$CheckedSortedMap
;
388 class Collections$CheckedSortedSet
;
389 class Collections$CopiesList
;
390 class Collections$EmptyList
;
391 class Collections$EmptyMap
;
392 class Collections$EmptySet
;
393 class Collections$ReverseComparator
;
394 class Collections$SingletonList
;
395 class Collections$SingletonMap
;
396 class Collections$SingletonSet
;
397 class Collections$SynchronizedCollection
;
398 class Collections$SynchronizedIterator
;
399 class Collections$SynchronizedList
;
400 class Collections$SynchronizedListIterator
;
401 class Collections$SynchronizedMap
;
402 class Collections$SynchronizedRandomAccessList
;
403 class Collections$SynchronizedSet
;
404 class Collections$SynchronizedSortedMap
;
405 class Collections$SynchronizedSortedSet
;
406 class Collections$UnmodifiableCollection
;
407 class Collections$UnmodifiableIterator
;
408 class Collections$UnmodifiableList
;
409 class Collections$UnmodifiableListIterator
;
410 class Collections$UnmodifiableMap
;
411 class Collections$UnmodifiableMap$UnmodifiableEntrySet
;
412 class Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableMapEntry
;
413 class Collections$UnmodifiableRandomAccessList
;
414 class Collections$UnmodifiableSet
;
415 class Collections$UnmodifiableSortedMap
;
416 class Collections$UnmodifiableSortedSet
;
418 class ConcurrentModificationException
;
423 class DuplicateFormatFlagsException
;
424 class EmptyStackException
;
437 class EventListenerProxy
;
439 class FormatFlagsConversionMismatchException
;
441 class FormattableFlags
;
443 class Formatter$BigDecimalLayoutForm
;
444 class FormatterClosedException
;
445 class GregorianCalendar
;
450 class HashMap$HashEntry
;
451 class HashMap$HashIterator
;
457 class Hashtable$EntryEnumerator
;
458 class Hashtable$EntryIterator
;
459 class Hashtable$HashEntry
;
460 class Hashtable$KeyEnumerator
;
461 class Hashtable$KeyIterator
;
462 class Hashtable$ValueEnumerator
;
463 class Hashtable$ValueIterator
;
464 class IdentityHashMap
;
465 class IdentityHashMap$
1;
466 class IdentityHashMap$
2;
467 class IdentityHashMap$
3;
468 class IdentityHashMap$IdentityEntry
;
469 class IdentityHashMap$IdentityIterator
;
470 class IllegalFormatCodePointException
;
471 class IllegalFormatConversionException
;
472 class IllegalFormatException
;
473 class IllegalFormatFlagsException
;
474 class IllegalFormatPrecisionException
;
475 class IllegalFormatWidthException
;
476 class InputMismatchException
;
477 class InvalidPropertiesFormatException
;
480 class LinkedHashMap$
1;
481 class LinkedHashMap$LinkedHashEntry
;
484 class LinkedList$Entry
;
485 class LinkedList$LinkedListItr
;
488 class ListResourceBundle
;
492 class MissingFormatArgumentException
;
493 class MissingFormatWidthException
;
494 class MissingResourceException
;
497 class NoSuchElementException
;
501 class PriorityQueue$
1;
503 class PropertyPermission
;
504 class PropertyPermissionCollection
;
505 class PropertyResourceBundle
;
509 class ResourceBundle
;
510 class ResourceBundle$
1;
511 class ResourceBundle$BundleKey
;
513 class SimpleTimeZone
;
517 class StringTokenizer
;
521 class Timer$Scheduler
;
522 class Timer$TaskQueue
;
524 class TooManyListenersException
;
533 class TreeMap$SubMap
;
534 class TreeMap$TreeIterator
;
537 class UnknownFormatConversionException
;
538 class UnknownFormatFlagsException
;
545 class WeakHashMap$WeakBucket
;
546 class WeakHashMap$WeakBucket$WeakEntry
;
547 class WeakHashMap$WeakEntrySet
;
550 class AbstractExecutorService
;
551 class ArrayBlockingQueue
;
552 class ArrayBlockingQueue$Itr
;
555 class BrokenBarrierException
;
557 class CancellationException
;
558 class CompletionService
;
559 class ConcurrentHashMap
;
560 class ConcurrentHashMap$EntryIterator
;
561 class ConcurrentHashMap$EntrySet
;
562 class ConcurrentHashMap$HashEntry
;
563 class ConcurrentHashMap$HashIterator
;
564 class ConcurrentHashMap$KeyIterator
;
565 class ConcurrentHashMap$KeySet
;
566 class ConcurrentHashMap$Segment
;
567 class ConcurrentHashMap$ValueIterator
;
568 class ConcurrentHashMap$Values
;
569 class ConcurrentHashMap$WriteThroughEntry
;
570 class ConcurrentLinkedQueue
;
571 class ConcurrentLinkedQueue$Itr
;
572 class ConcurrentLinkedQueue$Node
;
574 class ConcurrentNavigableMap
;
575 class ConcurrentSkipListMap
;
576 class ConcurrentSkipListMap$ComparableUsingComparator
;
577 class ConcurrentSkipListMap$EntryIterator
;
578 class ConcurrentSkipListMap$EntrySet
;
579 class ConcurrentSkipListMap$HeadIndex
;
580 class ConcurrentSkipListMap$Index
;
581 class ConcurrentSkipListMap$Iter
;
582 class ConcurrentSkipListMap$KeyIterator
;
583 class ConcurrentSkipListMap$KeySet
;
584 class ConcurrentSkipListMap$Node
;
585 class ConcurrentSkipListMap$SubMap
;
586 class ConcurrentSkipListMap$SubMap$SubMapEntryIterator
;
587 class ConcurrentSkipListMap$SubMap$SubMapIter
;
588 class ConcurrentSkipListMap$SubMap$SubMapKeyIterator
;
589 class ConcurrentSkipListMap$SubMap$SubMapValueIterator
;
590 class ConcurrentSkipListMap$ValueIterator
;
591 class ConcurrentSkipListMap$Values
;
592 class ConcurrentSkipListSet
;
593 class CopyOnWriteArrayList
;
594 class CopyOnWriteArraySet
;
595 class CountDownLatch
;
596 class CountDownLatch$Sync
;
598 class CyclicBarrier$Generation
;
600 class DelayQueue$Itr
;
603 class Exchanger$Node
;
604 class Exchanger$Slot
;
605 class ExecutionException
;
607 class ExecutorCompletionService
;
608 class ExecutorCompletionService$QueueingFuture
;
609 class ExecutorService
;
617 class Executors$DefaultThreadFactory
;
618 class Executors$DelegatedExecutorService
;
619 class Executors$DelegatedScheduledExecutorService
;
620 class Executors$FinalizableDelegatedExecutorService
;
621 class Executors$PrivilegedCallable
;
622 class Executors$PrivilegedCallableUsingCurrentClassLoader
;
623 class Executors$PrivilegedThreadFactory
;
624 class Executors$RunnableAdapter
;
627 class FutureTask$Sync
;
628 class LinkedBlockingDeque
;
629 class LinkedBlockingDeque$AbstractItr
;
630 class LinkedBlockingDeque$DescendingItr
;
631 class LinkedBlockingDeque$Itr
;
632 class LinkedBlockingDeque$Node
;
633 class LinkedBlockingQueue
;
634 class LinkedBlockingQueue$Itr
;
635 class LinkedBlockingQueue$Node
;
636 class PriorityBlockingQueue
;
637 class PriorityBlockingQueue$Itr
;
638 class RejectedExecutionException
;
639 class RejectedExecutionHandler
;
640 class RunnableFuture
;
641 class RunnableScheduledFuture
;
642 class ScheduledExecutorService
;
643 class ScheduledFuture
;
644 class ScheduledThreadPoolExecutor
;
645 class ScheduledThreadPoolExecutor$
1;
646 class ScheduledThreadPoolExecutor$DelayedWorkQueue
;
647 class ScheduledThreadPoolExecutor$ScheduledFutureTask
;
649 class Semaphore$FairSync
;
650 class Semaphore$NonfairSync
;
651 class Semaphore$Sync
;
652 class SynchronousQueue
;
653 class SynchronousQueue$EmptyIterator
;
654 class SynchronousQueue$FifoWaitQueue
;
655 class SynchronousQueue$LifoWaitQueue
;
656 class SynchronousQueue$TransferQueue
;
657 class SynchronousQueue$TransferQueue$QNode
;
658 class SynchronousQueue$TransferStack
;
659 class SynchronousQueue$TransferStack$SNode
;
660 class SynchronousQueue$Transferer
;
661 class SynchronousQueue$WaitQueue
;
663 class ThreadPoolExecutor
;
664 class ThreadPoolExecutor$AbortPolicy
;
665 class ThreadPoolExecutor$CallerRunsPolicy
;
666 class ThreadPoolExecutor$DiscardOldestPolicy
;
667 class ThreadPoolExecutor$DiscardPolicy
;
668 class ThreadPoolExecutor$Worker
;
677 class TimeoutException
;
682 class AtomicIntegerArray
;
683 class AtomicIntegerFieldUpdater
;
684 class AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl
;
686 class AtomicLongArray
;
687 class AtomicLongFieldUpdater
;
688 class AtomicLongFieldUpdater$CASUpdater
;
689 class AtomicLongFieldUpdater$LockedUpdater
;
690 class AtomicMarkableReference
;
691 class AtomicMarkableReference$ReferenceBooleanPair
;
692 class AtomicReference
;
693 class AtomicReferenceArray
;
694 class AtomicReferenceFieldUpdater
;
695 class AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
;
696 class AtomicStampedReference
;
697 class AtomicStampedReference$ReferenceIntegerPair
;
702 class AbstractOwnableSynchronizer
;
703 class AbstractQueuedLongSynchronizer
;
704 class AbstractQueuedLongSynchronizer$ConditionObject
;
705 class AbstractQueuedLongSynchronizer$Node
;
706 class AbstractQueuedSynchronizer
;
707 class AbstractQueuedSynchronizer$ConditionObject
;
708 class AbstractQueuedSynchronizer$Node
;
714 class ReentrantLock$FairSync
;
715 class ReentrantLock$NonfairSync
;
716 class ReentrantLock$Sync
;
717 class ReentrantReadWriteLock
;
718 class ReentrantReadWriteLock$FairSync
;
719 class ReentrantReadWriteLock$NonfairSync
;
720 class ReentrantReadWriteLock$ReadLock
;
721 class ReentrantReadWriteLock$Sync
;
722 class ReentrantReadWriteLock$Sync$HoldCounter
;
723 class ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter
;
724 class ReentrantReadWriteLock$WriteLock
;
731 class Attributes$Name
;
735 class JarFile$EntryInputStream
;
736 class JarFile$JarEnumeration
;
737 class JarInputStream
;
738 class JarOutputStream
;
744 class ConsoleHandler
;
747 class FileHandler$ostr
;
758 class LoggingPermission
;
760 class SimpleFormatter
;
768 class AbstractPreferences
;
769 class AbstractPreferences$
1;
770 class AbstractPreferences$
2;
771 class BackingStoreException
;
772 class InvalidPreferencesFormatException
;
773 class NodeChangeEvent
;
774 class NodeChangeListener
;
775 class PreferenceChangeEvent
;
776 class PreferenceChangeListener
;
779 class PreferencesFactory
;
787 class PatternSyntaxException
;
794 class CheckedInputStream
;
795 class CheckedOutputStream
;
797 class DataFormatException
;
799 class DeflaterOutputStream
;
800 class GZIPInputStream
;
801 class GZIPOutputStream
;
803 class InflaterInputStream
;
809 class ZipFile$PartialInputStream
;
810 class ZipFile$ZipEntryEnumeration
;
811 class ZipInputStream
;
812 class ZipOutputStream
;
818 typedef struct java::lang::Object
* jobject
;
819 typedef class java::lang::Class
* jclass
;
820 typedef class java::lang::Throwable
* jthrowable
;
821 typedef class java::lang::String
* jstring
;
824 typedef struct _Jv_Field
*jfieldID
;
825 typedef struct _Jv_Method
*jmethodID
;
827 extern "C" jobject
_Jv_AllocObject (jclass
) __attribute__((__malloc__
));
828 extern "C" jobject
_Jv_AllocObjectNoFinalizer (jclass
) __attribute__((__malloc__
));
829 extern "C" jobject
_Jv_AllocObjectNoInitNoFinalizer (jclass
) __attribute__((__malloc__
));
830 #ifdef JV_HASH_SYNCHRONIZATION
831 extern "C" jobject
_Jv_AllocPtrFreeObject (jclass
)
832 __attribute__((__malloc__
));
834 // Collector still needs to scan sync_info
835 static inline jobject
_Jv_AllocPtrFreeObject (jclass klass
)
837 return _Jv_AllocObject(klass
);
840 extern "C" jboolean
_Jv_IsInstanceOf(jobject
, jclass
);
841 extern "C" jstring
_Jv_AllocString(jsize
) __attribute__((__malloc__
));
842 extern "C" jstring
_Jv_NewString (const jchar
*, jsize
)
843 __attribute__((__malloc__
));
844 extern jint
_Jv_FormatInt (jchar
* bufend
, jint num
);
845 extern "C" jchar
* _Jv_GetStringChars (jstring str
);
846 extern "C" void _Jv_MonitorEnter (jobject
);
847 extern "C" void _Jv_MonitorExit (jobject
);
848 extern "C" jstring
_Jv_NewStringUTF (const char *bytes
)
849 __attribute__((__malloc__
));
850 extern "C" jstring
_Jv_NewStringLatin1(const char*, jsize
)
851 __attribute__((__malloc__
));
852 extern "C" jsize
_Jv_GetStringUTFLength (jstring
);
853 extern "C" jsize
_Jv_GetStringUTFRegion (jstring
, jsize
, jsize
, char *);
854 extern "C" jint
_Jv_hashUtf8String (const char*, int);
855 extern bool _Jv_is_proxy (void *pc
);
859 // a VM initialization option
861 // extra information associated with this option
865 struct _Jv_VMInitArgs
867 // for compatibility with JavaVMInitArgs
870 // number of VM initialization options
873 // an array of VM initialization options
874 struct _Jv_VMOption
* options
;
876 // true if the option parser should ignore unrecognized options
877 jboolean ignoreUnrecognized
;
880 extern jint
_Jv_CreateJavaVM (struct _Jv_VMInitArgs
*);
883 _Jv_ThreadRun (java::lang::Thread
* thread
);
885 _Jv_AttachCurrentThread(java::lang::Thread
* thread
);
886 extern "C" java::lang::Thread
*
887 _Jv_AttachCurrentThread(jstring name
, java::lang::ThreadGroup
* group
);
888 extern "C" java::lang::Thread
*
889 _Jv_AttachCurrentThreadAsDaemon(jstring name
, java::lang::ThreadGroup
* group
);
890 extern "C" jint
_Jv_DetachCurrentThread (void);
892 extern "C" void _Jv_Throw (jthrowable
) __attribute__ ((__noreturn__
));
893 extern "C" void* _Jv_Malloc (jsize
) __attribute__((__malloc__
));
894 extern "C" void* _Jv_Realloc (void *, jsize
);
895 extern "C" void _Jv_Free (void*);
896 extern void (*_Jv_RegisterClassHook
) (jclass cl
);
897 extern "C" void _Jv_RegisterClassHookDefault (jclass
);
899 typedef unsigned short _Jv_ushort
__attribute__((__mode__(__HI__
)));
900 typedef unsigned int _Jv_uint
__attribute__((__mode__(__SI__
)));
901 typedef unsigned int _Jv_ulong
__attribute__((__mode__(__DI__
)));
903 // The type to use when treating a pointer as an integer. Similar to
905 typedef unsigned int _Jv_uintptr_t
__attribute__((__mode__(__pointer__
)));
910 _Jv_ushort length
; /* In bytes, of data portion, without final '\0'. */
911 char data
[1]; /* In Utf8 format, with final '\0'. */
913 /** Return same value of java.lang.String's hashCode. */
914 jint
hash32() { return _Jv_hashUtf8String(data
, length
); }
915 /** Return a hash code that has at least 16 bits of information. */
916 _Jv_ushort
hash16 () { return hash
; }
917 /** Return a hash code that has at least 8 bits of information. */
918 _Jv_ushort
hash8 () { return hash
; }
919 /** Length in bytes of the UTF8-encoding. */
920 _Jv_ushort
len () const { return length
; }
921 /** Pointer to the first byte in the NUL-terminated UTF8-encoding. */
922 char* chars() { return data
; }
923 /** Pointer to the NUL byte that terminated the UTF8-encoding. */
924 char* limit() { return data
+length
; }
925 /** Return the first byte in the UTF8-encoding. */
926 char first() const { return data
[0]; }
927 /** Create a (non-interned) java.lang.String from this UTF8Const. */
928 jstring
toString() { return _Jv_NewStringUTF(data
); }
929 /** Given an UTF8 string, how many bytes needed for a UTF8Const,
930 including struct header, and final NUL. I.e. what to pas to malloc. */
931 static int space_needed (const char *, int len
)
932 { return sizeof (_Jv_Utf8Const
) + len
+ 1; }
933 /** Given an allocated _Jv_Utf8Const, copy / fill it in. */
934 void init (const char *s
, int len
);
935 friend jboolean
_Jv_equalUtf8Consts (const _Jv_Utf8Const
*, const _Jv_Utf8Const
*);
936 friend jboolean
_Jv_equal (_Jv_Utf8Const
*, jstring
, jint
);
937 friend jboolean
_Jv_equaln (_Jv_Utf8Const
*, jstring
, jint
);
938 friend jboolean
_Jv_equalUtf8Classnames (const _Jv_Utf8Const
*,
939 const _Jv_Utf8Const
*);
940 friend jboolean
_Jv_isPrimitiveOrDerived (const _Jv_Utf8Const
*);
941 friend _Jv_Utf8Const
*_Jv_makeUtf8Const (const char*, int);
942 friend _Jv_Utf8Const
*_Jv_makeUtf8Const (jstring
);
943 friend jstring
_Jv_NewStringUtf8Const (_Jv_Utf8Const
*);
947 #endif /* __JAVAPRIMS_H__ */