-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathooRexxAPI.cpp
38 lines (30 loc) · 1.16 KB
/
ooRexxAPI.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <oorexxapi.h>
RexxRoutine1(logical_t, IsString, RexxObjectPtr, obj) {
return context->IsString(obj);
}
RexxRoutine2(logical_t, IsInstanceOfClass, RexxObjectPtr, obj, CSTRING, name) {
RexxClassObject class_ = context->FindClass(name);
return context->IsInstanceOf(obj, class_);
}
RexxRoutine2(logical_t, IsInstanceOfContextClass, RexxObjectPtr, obj, CSTRING, name) {
RexxClassObject class_ = context->FindContextClass(name);
return context->IsInstanceOf(obj, class_);
}
RexxRoutineEntry oorexxapi_functions[] = {
REXX_TYPED_ROUTINE(IsString, IsString),
REXX_TYPED_ROUTINE(IsInstanceOfClass, IsInstanceOfClass),
REXX_TYPED_ROUTINE(IsInstanceOfContextClass, IsInstanceOfContextClass),
REXX_LAST_ROUTINE()
};
RexxPackageEntry oorexxapi_package_entry = {
STANDARD_PACKAGE_HEADER
REXX_CURRENT_INTERPRETER_VERSION, // ooRexx version at compilation time or higher
"ooRexx API", // name of the package
"1.0.0", // package information
NULL, // no load function
NULL, // no unload function
oorexxapi_functions, // the exported routines
NULL // the exported methods
};
// package loading stub.
OOREXX_GET_PACKAGE(oorexxapi);