You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dox/API_CLASS.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ int mulle_objc_class_add_methodlist( struct _mulle_objc_class *cls,
31
31
struct _mulle_objc_methodlist *list)
32
32
```
33
33
34
-
Add methodlist `list` to `cls`. The methodlist isn't copied, so be sure that is sticks around for the lifetime of the runtime. (Check out `mulle_objc_runtime_unfailing_add_gift`)
34
+
Add methodlist `list` to `cls`. The methodlist isn't copied, so be sure that is sticks around for the lifetime of the runtime. (Check out `mulle_objc_universe_add_gift_nofail`)
Take `info` and queue the contained classes, categories, strings up for inclusion into the runtime. If the base class of a class or category is already present, it will be added immediately to the runtime. Otherwise the inclusion will be delayed until the base class appears.
15
15
16
-
The **unfailing** in `mulle_objc_loadinfo_unfailing_enqueue` indicates, that the function will throw an exception or abort, if the runtime is not properly setup or if it detects errors in `info`.
16
+
The **unfailing** in `mulle_objc_loadinfo_enqueue_nofail` indicates, that the function will throw an exception or abort, if the runtime is not properly setup or if it detects errors in `info`.
17
17
18
-
This information is usually created by the compiler, but if you want to add a class at runtime, you would also do it via `mulle_objc_loadinfo_unfailing_enqueue`.
18
+
This information is usually created by the compiler, but if you want to add a class at runtime, you would also do it via `mulle_objc_loadinfo_enqueue_nofail`.
19
19
20
20
Checkout [demo1.c](../tests/demo/demo1.c) for a fairly well documented example, how to do this.
21
21
22
-
> `mulle_objc_loadinfo_unfailing_enqueue` will treat the contents of
22
+
> `mulle_objc_loadinfo_enqueue_nofail` will treat the contents of
23
23
> `_mulle_objc_loadinfo` as if they are in read only memory, with all
24
24
> its implications, with respect to lifetime and mutability.
Copy file name to clipboardExpand all lines: dox/API_UNIVERSE.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ other.
65
65
66
66
Parametername | Description
67
67
--------------------|----------------------
68
-
`universe` | Pointer to the universe, must not be NULL. Use `__get_or_create_mulle_objc_universe` (not `mulle_objc_get_universe`) to get the proper one for your thread
68
+
`universe` | Pointer to the universe, must not be NULL. Use `__register_mulle_objc_universe` (not `mulle_objc_get_universe`) to get the proper one for your thread
69
69
`classid` | Compute the `classid` from `name` with `mulle_objc_classid_from_string`
70
70
`name` | The name of the class, this must be a non-empty ASCII string. This string is not copied. It must remain alive for the duration of the class's existence.
71
71
`instance_size` | The space needed for instance variables (don't add the header size)
Copy file name to clipboardExpand all lines: dox/load/LOAD.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ GNUStep basically guarantees nothing. `+load`s are performed as they are coming
61
61
62
62
## Call `+load` before or after addition to runtime ?
63
63
64
-
One question is, if `+load` should be called before the class or category
65
-
is added to the runtime system or after. If the `+load` is called before
64
+
One question is, if `+load` should be called before the class or category
65
+
is added to the runtime system or after. If the `+load` is called before
66
66
the addition, the following functionality is unavailable in `+load`:
67
67
68
68
#### For classes
@@ -78,9 +78,9 @@ This is not desirable and expected by the user (class programmer). Is it avoidab
78
78
79
79
## +load in mulle-objc-runtime
80
80
81
-
The **mulle-objc-runtime** allows classes and categories to specify arbitrary dependencies on other classes and categories for `+load` calls. It is the
81
+
The **mulle-objc-runtime** allows classes and categories to specify arbitrary dependencies on other classes and categories for `+load` calls. It is the
82
82
burden of the `+load` author to ensure, that there are no cycles.
83
-
83
+
84
84
The **mulle-objc-runtime** automatically detects dependencies on superclasses and
85
85
protocolclasses for classes. It detects dependencies on its base class and protocolclasses for categories.
86
86
@@ -111,7 +111,7 @@ Each dependency either specifies the missing classid for a class, or the missing
111
111
5. A class or category who's dependencies are not satisfied, is not added to
112
112
the runtime system immediately. Instead its addition is postponed, until
113
113
the requirements are met.
114
-
114
+
115
115
### Other consequence of this design
116
116
117
117
Other C `__attribute__(constructor)` code and C++ initializers are unsequenced in relationship to `+load`. Shared libraries do not impose a sequencing order nor do they imply `+load` execution guarantees for contained loadable.
@@ -123,7 +123,7 @@ If a category does override `+initialize`, it should query the state bit with `_
123
123
The MulleObjCFoundation for example guarantees, that its classes or categories
124
124
do not trigger `+initialize` during `+load`.
125
125
126
-
126
+
127
127
## How classes and categories are loaded in mulle-objc-runtime
128
128
129
129
@@ -132,7 +132,7 @@ do not trigger `+initialize` during `+load`.
132
132
> is called a loadable for short.
133
133
134
134
135
-
If we assume, that the executable is composed of a complete set of loadcategories and loadclasses without missing dependencies, then all classes and categories will be installed ahead of `main`. They get installed via `__attribute__((constructor))` function calls to `mulle_objc_loadinfo_unfailing_enqueue`, the **mulle-clang** compiler emits:
135
+
If we assume, that the executable is composed of a complete set of loadcategories and loadclasses without missing dependencies, then all classes and categories will be installed ahead of `main`. They get installed via `__attribute__((constructor))` function calls to `mulle_objc_loadinfo_enqueue_nofail`, the **mulle-clang** compiler emits:
0 commit comments