comparison src/structs.h @ 31692:2f1af1b2f82d v9.0.1178

patch 9.0.1178: a child class cannot override functions from a base class Commit: https://github.com/vim/vim/commit/58b40092e616585a763cf4d214d47ccd9167d6f7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 11 15:59:05 2023 +0000 patch 9.0.1178: a child class cannot override functions from a base class Problem: A child class cannot override functions from a base class. Solution: Allow overriding and implement "super".
author Bram Moolenaar <Bram@vim.org>
date Wed, 11 Jan 2023 17:00:05 +0100
parents ec76f9d2319e
children 69ee530cac28
comparison
equal deleted inserted replaced
31691:db1f32c41199 31692:2f1af1b2f82d
1463 #define TTFLAG_VARARGS 0x01 // func args ends with "..." 1463 #define TTFLAG_VARARGS 0x01 // func args ends with "..."
1464 #define TTFLAG_BOOL_OK 0x02 // can be converted to bool 1464 #define TTFLAG_BOOL_OK 0x02 // can be converted to bool
1465 #define TTFLAG_NUMBER_OK 0x04 // tt_type is VAR_FLOAT, VAR_NUMBER is OK 1465 #define TTFLAG_NUMBER_OK 0x04 // tt_type is VAR_FLOAT, VAR_NUMBER is OK
1466 #define TTFLAG_STATIC 0x08 // one of the static types, e.g. t_any 1466 #define TTFLAG_STATIC 0x08 // one of the static types, e.g. t_any
1467 #define TTFLAG_CONST 0x10 // cannot be changed 1467 #define TTFLAG_CONST 0x10 // cannot be changed
1468 #define TTFLAG_SUPER 0x20 // object from "super".
1468 1469
1469 typedef enum { 1470 typedef enum {
1470 ACCESS_PRIVATE, // read/write only inside th class 1471 ACCESS_PRIVATE, // read/write only inside th class
1471 ACCESS_READ, // read everywhere, write only inside th class 1472 ACCESS_READ, // read everywhere, write only inside th class
1472 ACCESS_ALL // read/write everywhere 1473 ACCESS_ALL // read/write everywhere
1504 int class_class_member_count; 1505 int class_class_member_count;
1505 ocmember_T *class_class_members; // allocated 1506 ocmember_T *class_class_members; // allocated
1506 typval_T *class_members_tv; // allocated array of class member vals 1507 typval_T *class_members_tv; // allocated array of class member vals
1507 1508
1508 // class functions: "static def SomeMethod()" 1509 // class functions: "static def SomeMethod()"
1509 int class_class_function_count; 1510 int class_class_function_count; // total count
1511 int class_class_function_count_child; // count without "extends"
1510 ufunc_T **class_class_functions; // allocated 1512 ufunc_T **class_class_functions; // allocated
1511 1513
1512 // object members: "this.varname" 1514 // object members: "this.varname"
1513 int class_obj_member_count; 1515 int class_obj_member_count;
1514 ocmember_T *class_obj_members; // allocated 1516 ocmember_T *class_obj_members; // allocated
1515 1517
1516 // object methods: "def SomeMethod()" 1518 // object methods: "def SomeMethod()"
1517 int class_obj_method_count; 1519 int class_obj_method_count; // total count
1520 int class_obj_method_count_child; // count without "extends"
1518 ufunc_T **class_obj_methods; // allocated 1521 ufunc_T **class_obj_methods; // allocated
1519 1522
1520 garray_T class_type_list; // used for type pointers 1523 garray_T class_type_list; // used for type pointers
1521 type_T class_type; // type used for the class 1524 type_T class_type; // type used for the class
1522 type_T class_object_type; // same as class_type but VAR_OBJECT 1525 type_T class_object_type; // same as class_type but VAR_OBJECT