ObjFW  Diff

Differences From Artifact [5258b334d9]:

To Artifact [8884ec4c85]:


169
170
171
172
173
174
175
















176
177
178
179
180
181
182
#ifdef __cplusplus
	Class _Nonnull class_;
#else
	Class _Nonnull class;
#endif
};

















#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Registers a selector with the specified name with the runtime.
 *







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#ifdef __cplusplus
	Class _Nonnull class_;
#else
	Class _Nonnull class;
#endif
};

/**
 * @brief A policy for object association, see @ref objc_setAssociatedObject.
 */
typedef enum objc_associationPolicy {
	/** @brief Associate the object like an assigned property. */
	OBJC_ASSOCIATION_ASSIGN	= 0,
	/** @brief Associate the object like a retained, nonatomic property. */
	OBJC_ASSOCIATION_RETAIN_NONATOMIC = 1,
	/** @brief Associate the object like a retained property. */
	OBJC_ASSOCIATION_RETAIN = OBJC_ASSOCIATION_RETAIN_NONATOMIC | 0x300,
	/** @brief Associate the object like a copied, nonatomic property. */
	OBJC_ASSOCIATION_COPY_NONATOMIC = 3,
	/** @brief Associate the object like a copied property. */
	OBJC_ASSOCIATION_COPY = OBJC_ASSOCIATION_COPY_NONATOMIC | 0x300
} objc_associationPolicy;

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Registers a selector with the specified name with the runtime.
 *
642
643
644
645
646
647
648































649
650
651
652
653
654
655
 *
 * @param class_ The tag ID for the tagged pointer class to use
 * @param value The value the tagged pointer should have
 * @return A tagged pointer, or `nil` if it could not be created
 */
extern id _Nullable objc_createTaggedPointer(int class_, uintptr_t value);
































/*
 * Used by the compiler, but can also be called manually.
 *
 * These declarations are also required to prevent Clang's implicit
 * declarations which include __declspec(dllimport) on Windows.
 */
struct objc_module;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
 *
 * @param class_ The tag ID for the tagged pointer class to use
 * @param value The value the tagged pointer should have
 * @return A tagged pointer, or `nil` if it could not be created
 */
extern id _Nullable objc_createTaggedPointer(int class_, uintptr_t value);

/**
 * @brief Sets an associated object on the specified object for the specified
 *	  key.
 *
 * @param object The object on which to set an associated object
 * @param key A unique pointer to use as the key for the association
 * @param value The object to associate with the specified object
 * @param policy The association policy, see @ref objc_associationPolicy
 */
extern void objc_setAssociatedObject(id _Nonnull object,
    const void *_Nonnull key, id _Nullable value,
    objc_associationPolicy policy);

/**
 * @brief Returns the associated object on the specified object for the
 *	  specified key.
 *
 * @param object The object on which to get the associated object
 * @param key The key of the association
 * @return The associated object on the specified object for the specified key
 */
extern id _Nullable objc_getAssociatedObject(id _Nonnull object,
    const void *_Nonnull key);

/**
 * @brief Removes all associated objects for the specified object.
 *
 * @param object The object on which to remove all associated objects
 */
extern void objc_removeAssociatedObjects(id _Nonnull object);

/*
 * Used by the compiler, but can also be called manually.
 *
 * These declarations are also required to prevent Clang's implicit
 * declarations which include __declspec(dllimport) on Windows.
 */
struct objc_module;