summaryrefslogtreecommitdiffstats
path: root/src/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 4a82c82e6d..f5ad17414a 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1881,6 +1881,13 @@ struct ufunc_S
#define FC_NEW 0x8000 // constructor
#define FC_ABSTRACT 0x10000 // abstract method
+// Is "ufunc" an object method?
+#define IS_OBJECT_METHOD(ufunc) ((ufunc->uf_flags & FC_OBJECT) == FC_OBJECT)
+// Is "ufunc" a class new() constructor method?
+#define IS_CONSTRUCTOR_METHOD(ufunc) ((ufunc->uf_flags & FC_NEW) == FC_NEW)
+// Is "ufunc" an abstract class method?
+#define IS_ABSTRACT_METHOD(ufunc) ((ufunc->uf_flags & FC_ABSTRACT) == FC_ABSTRACT)
+
#define MAX_FUNC_ARGS 20 // maximum number of function arguments
#define VAR_SHORT_LEN 20 // short variable name length
#define FIXVAR_CNT 12 // number of fixed variables