Commit 2899534b by Nicola Pero Committed by Nicola Pero

In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>

In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc/encoding.h: Updated comments.
	* objc/runtime.h: Updated comments.
	(objc_setGetUnknownClassHandler): Mark with objc_EXPORT.
	(objc_sizeof_type): Same.
	(objc_alignof_type): Same.
	(objc_aligned_size): Same.
	(objc_promoted_size): Same.
	(objc_skip_type_qualifiers): Same.
	(objc_skip_typespec): Same.
	(objc_skip_offset): Same.
	(objc_skip_argspec): Same.
	(objc_get_type_qualifiers): Same.
	(objc_layout_structure): Same.
	(objc_layout_structure_next_member): Same.
	(objc_layout_finish_structure): Same.
	(objc_layout_structure_get_info): Same.

From-SVN: r168051
parent a6fed83f
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/encoding.h: Updated comments.
* objc/runtime.h: Updated comments.
(objc_setGetUnknownClassHandler): Mark with objc_EXPORT.
(objc_sizeof_type): Same.
(objc_alignof_type): Same.
(objc_aligned_size): Same.
(objc_promoted_size): Same.
(objc_skip_type_qualifiers): Same.
(objc_skip_typespec): Same.
(objc_skip_offset): Same.
(objc_skip_argspec): Same.
(objc_get_type_qualifiers): Same.
(objc_layout_structure): Same.
(objc_layout_structure_next_member): Same.
(objc_layout_finish_structure): Same.
(objc_layout_structure_get_info): Same.
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c: Updated comments. * init.c: Updated comments.
* objc/objc-api.h: Updated comments. * objc/objc-api.h: Updated comments.
* objc/runtime.h (_objc_load_callback): Declare. * objc/runtime.h (_objc_load_callback): Declare.
......
...@@ -31,8 +31,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -31,8 +31,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* This file is to be used with the "traditional" GNU Objective-C /* This file is to be used with the "traditional" GNU Objective-C
Runtime API (the one declared in objc/objc-api.h). If you are Runtime API (the one declared in objc/objc-api.h). If you are
using the "modern" GNU Objective-C Runtime API, then the useful using the "modern" GNU Objective-C Runtime API, then the useful
functions from this file are declared in objc/runtime.h. functions from this file are declared in objc/runtime.h. */
*/
#include "objc-api.h" #include "objc-api.h"
#include <ctype.h> #include <ctype.h>
...@@ -71,9 +70,15 @@ const char *objc_skip_type_qualifiers (const char *type); ...@@ -71,9 +70,15 @@ const char *objc_skip_type_qualifiers (const char *type);
const char *objc_skip_typespec (const char *type); const char *objc_skip_typespec (const char *type);
const char *objc_skip_offset (const char *type); const char *objc_skip_offset (const char *type);
const char *objc_skip_argspec (const char *type); const char *objc_skip_argspec (const char *type);
unsigned objc_get_type_qualifiers (const char *type);
/* The following functions are replaced, in the modern API, by
method_getNumberOfArguments(), method_getArgumentType(). */
int method_get_number_of_arguments (struct objc_method *); int method_get_number_of_arguments (struct objc_method *);
int method_get_sizeof_arguments (struct objc_method *); int method_get_sizeof_arguments (struct objc_method *);
/* The following functions are deprecated and they use arglist_t which
is deprecated. */
char *method_get_first_argument (struct objc_method *, char *method_get_first_argument (struct objc_method *,
arglist_t argframe, arglist_t argframe,
const char **type); const char **type);
...@@ -84,10 +89,7 @@ char *method_get_nth_argument (struct objc_method *m, ...@@ -84,10 +89,7 @@ char *method_get_nth_argument (struct objc_method *m,
int arg, int arg,
const char **type); const char **type);
unsigned objc_get_type_qualifiers (const char *type); struct objc_struct_layout
struct objc_struct_layout
{ {
const char *original_type; const char *original_type;
const char *type; const char *type;
......
...@@ -410,6 +410,7 @@ typedef Class (*objc_get_unknown_class_handler)(const char *class_name); ...@@ -410,6 +410,7 @@ typedef Class (*objc_get_unknown_class_handler)(const char *class_name);
This function is not safe to call in a multi-threaded environment This function is not safe to call in a multi-threaded environment
because other threads may be trying to use the get unknown class because other threads may be trying to use the get unknown class
handler while you change it! */ handler while you change it! */
objc_EXPORT
objc_get_unknown_class_handler objc_get_unknown_class_handler
objc_setGetUnknownClassHandler (objc_get_unknown_class_handler new_handler); objc_setGetUnknownClassHandler (objc_get_unknown_class_handler new_handler);
...@@ -971,21 +972,21 @@ objc_EXPORT void objc_free(void *mem); ...@@ -971,21 +972,21 @@ objc_EXPORT void objc_free(void *mem);
/* Return the size of a variable which has the specified 'type' /* Return the size of a variable which has the specified 'type'
encoding. */ encoding. */
int objc_sizeof_type (const char *type); objc_EXPORT int objc_sizeof_type (const char *type);
/* Return the align of a variable which has the specified 'type' /* Return the align of a variable which has the specified 'type'
encoding. */ encoding. */
int objc_alignof_type (const char *type); objc_EXPORT int objc_alignof_type (const char *type);
/* Return the aligned size of a variable which has the specified /* Return the aligned size of a variable which has the specified
'type' encoding. The aligned size is the size rounded up to the 'type' encoding. The aligned size is the size rounded up to the
nearest alignment. */ nearest alignment. */
int objc_aligned_size (const char *type); objc_EXPORT int objc_aligned_size (const char *type);
/* Return the promoted size of a variable which has the specified /* Return the promoted size of a variable which has the specified
'type' encoding. This is the size rounded up to the nearest 'type' encoding. This is the size rounded up to the nearest
integral of the wordsize, taken to be the size of a void *. */ integral of the wordsize, taken to be the size of a void *. */
int objc_promoted_size (const char *type); objc_EXPORT int objc_promoted_size (const char *type);
/* The following functions are used when parsing the type encoding of /* The following functions are used when parsing the type encoding of
...@@ -998,30 +999,30 @@ int objc_promoted_size (const char *type); ...@@ -998,30 +999,30 @@ int objc_promoted_size (const char *type);
/* Skip some type qualifiers (_C_CONST, _C_IN, etc). These may /* Skip some type qualifiers (_C_CONST, _C_IN, etc). These may
eventually precede typespecs occurring in method prototype eventually precede typespecs occurring in method prototype
encodings. */ encodings. */
const char *objc_skip_type_qualifiers (const char *type); objc_EXPORT const char *objc_skip_type_qualifiers (const char *type);
/* Skip one typespec element (_C_CLASS, _C_SEL, etc). If the typespec /* Skip one typespec element (_C_CLASS, _C_SEL, etc). If the typespec
is prepended by type qualifiers, these are skipped as well. */ is prepended by type qualifiers, these are skipped as well. */
const char *objc_skip_typespec (const char *type); objc_EXPORT const char *objc_skip_typespec (const char *type);
/* Skip an offset. */ /* Skip an offset. */
const char *objc_skip_offset (const char *type); objc_EXPORT const char *objc_skip_offset (const char *type);
/* Skip an argument specification (ie, skipping a typespec, which may /* Skip an argument specification (ie, skipping a typespec, which may
include qualifiers, and an offset too). */ include qualifiers, and an offset too). */
const char *objc_skip_argspec (const char *type); objc_EXPORT const char *objc_skip_argspec (const char *type);
/* Read type qualifiers (_C_CONST, _C_IN, etc) from string 'type' /* Read type qualifiers (_C_CONST, _C_IN, etc) from string 'type'
(stopping at the first non-type qualifier found) and return an (stopping at the first non-type qualifier found) and return an
unsigned int which is the logical OR of all the corresponding flags unsigned int which is the logical OR of all the corresponding flags
(_F_CONST, _F_IN etc). */ (_F_CONST, _F_IN etc). */
unsigned objc_get_type_qualifiers (const char *type); objc_EXPORT unsigned objc_get_type_qualifiers (const char *type);
/* Note that the following functions work for very simple structures, /* Note that the following functions work for very simple structures,
but get easily confused by more complicated ones (for example, but get easily confused by more complicated ones (for example,
containing vectors). A better solution is required. containing vectors). A better solution is required. These
*/ functions are likely to change in the next GCC release. */
/* The following three functions can be used to determine how a /* The following three functions can be used to determine how a
structure is laid out by the compiler. For example: structure is laid out by the compiler. For example:
...@@ -1054,16 +1055,16 @@ struct objc_struct_layout ...@@ -1054,16 +1055,16 @@ struct objc_struct_layout
unsigned int record_align; unsigned int record_align;
}; };
void objc_layout_structure (const char *type, objc_EXPORT void objc_layout_structure (const char *type,
struct objc_struct_layout *layout); struct objc_struct_layout *layout);
BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout); objc_EXPORT BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
void objc_layout_finish_structure (struct objc_struct_layout *layout, objc_EXPORT void objc_layout_finish_structure (struct objc_struct_layout *layout,
unsigned int *size, unsigned int *size,
unsigned int *align); unsigned int *align);
void objc_layout_structure_get_info (struct objc_struct_layout *layout, objc_EXPORT void objc_layout_structure_get_info (struct objc_struct_layout *layout,
unsigned int *offset, unsigned int *offset,
unsigned int *align, unsigned int *align,
const char **type); const char **type);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment