ObjFW  Diff

Differences From Artifact [70b1b483a7]:

To Artifact [f2f4fe0c3b]:


15
16
17
18
19
20
21
22
23
24





25
26
27
28
29





30
31
32
33
34
35
36

#import "OFObject.h"

@class OFString;

#ifndef OF_WINDOWS
# include <dlfcn.h>
# define OF_RTLD_LAZY RTLD_LAZY
# define OF_RTLD_NOW  RTLD_NOW
typedef void *OFPluginHandle;





#else
# include <windows.h>
# define OF_RTLD_LAZY 0
# define OF_RTLD_NOW  0
typedef HMODULE OFPluginHandle;





#endif

OF_ASSUME_NONNULL_BEGIN

/**
 * @class OFPlugin OFPlugin.h ObjFW/OFPlugin.h
 *







<
<

>
>
>
>
>


<
<

>
>
>
>
>







15
16
17
18
19
20
21


22
23
24
25
26
27
28
29


30
31
32
33
34
35
36
37
38
39
40
41
42

#import "OFObject.h"

@class OFString;

#ifndef OF_WINDOWS
# include <dlfcn.h>


typedef void *OFPluginHandle;

typedef enum OFDLOpenFlags {
	OFDLOpenFlagLazy = RTLD_LAZY,
	OFDLOpenFlagNow  = RTLD_NOW
} OFDLOpenFlags;
#else
# include <windows.h>


typedef HMODULE OFPluginHandle;

enum OFDLOpenFlags {
	OFDLOpenFlagLazy = 0,
	OFDLOpenFlagNow  = 0
};
#endif

OF_ASSUME_NONNULL_BEGIN

/**
 * @class OFPlugin OFPlugin.h ObjFW/OFPlugin.h
 *
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 */
+ (OF_KINDOF(OFPlugin *))pluginWithPath: (OFString *)path;
@end

#ifdef __cplusplus
extern "C" {
#endif
extern OFPluginHandle OFDlOpen(OFString *path, int flags);
extern void *OFDlSym(OFPluginHandle handle, const char *symbol);
extern OFString *_Nullable OFDlError(void);
extern void OFDlClose(OFPluginHandle handle);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







|
|
|
|





56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 */
+ (OF_KINDOF(OFPlugin *))pluginWithPath: (OFString *)path;
@end

#ifdef __cplusplus
extern "C" {
#endif
extern OFPluginHandle OFDLOpen(OFString *path, OFDLOpenFlags flags);
extern void *OFDLSym(OFPluginHandle handle, const char *symbol);
extern OFString *_Nullable OFDLError(void);
extern void OFDLClose(OFPluginHandle handle);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END