Patch 9.0.1381
Problem:    ACCESS_ names have a conflict with on some systems.
Solution:   Rename by prepending VIM_. (Ola Söder, closes #12105)
Files:      src/structs.h, src/eval.c, src/vim9class.c, src/fileio.c


*** ../vim-9.0.1380/src/structs.h       2023-03-03 12:26:11.553759303 +0000
--- src/structs.h       2023-03-05 13:08:45.088581967 +0000
***************
*** 1469,1477 ****
  #define TTFLAG_SUPER      0x40    // object from "super".
  
  typedef enum {
!     ACCESS_PRIVATE,   // read/write only inside th class
!     ACCESS_READ,      // read everywhere, write only inside th class
!     ACCESS_ALL                // read/write everywhere
  } omacc_T;
  
  /*
--- 1469,1477 ----
  #define TTFLAG_SUPER      0x40    // object from "super".
  
  typedef enum {
!     VIM_ACCESS_PRIVATE,       // read/write only inside th class
!     VIM_ACCESS_READ,  // read everywhere, write only inside th class
!     VIM_ACCESS_ALL    // read/write everywhere
  } omacc_T;
  
  /*
*** ../vim-9.0.1380/src/eval.c  2023-02-21 19:55:02.795958051 +0000
--- src/eval.c  2023-03-05 13:06:40.040438088 +0000
***************
*** 1576,1586 ****
                        {
                            switch (om->ocm_access)
                            {
!                               case ACCESS_PRIVATE:
                                        
semsg(_(e_cannot_access_private_member_str),
                                                                 om->ocm_name);
                                        return NULL;
!                               case ACCESS_READ:
                                        if ((flags & GLV_READ_ONLY) == 0)
                                        {
                                            
semsg(_(e_member_is_not_writable_str),
--- 1576,1586 ----
                        {
                            switch (om->ocm_access)
                            {
!                               case VIM_ACCESS_PRIVATE:
                                        
semsg(_(e_cannot_access_private_member_str),
                                                                 om->ocm_name);
                                        return NULL;
!                               case VIM_ACCESS_READ:
                                        if ((flags & GLV_READ_ONLY) == 0)
                                        {
                                            
semsg(_(e_member_is_not_writable_str),
***************
*** 1588,1594 ****
                                            return NULL;
                                        }
                                        break;
!                               case ACCESS_ALL:
                                        break;
                            }
  
--- 1588,1594 ----
                                            return NULL;
                                        }
                                        break;
!                               case VIM_ACCESS_ALL:
                                        break;
                            }
  
*** ../vim-9.0.1380/src/vim9class.c     2023-02-25 19:59:27.892421722 +0000
--- src/vim9class.c     2023-03-05 13:07:20.552488503 +0000
***************
*** 148,155 ****
        return FAIL;
      ocmember_T *m = ((ocmember_T *)gap->ga_data) + gap->ga_len;
      m->ocm_name = vim_strnsave(varname, varname_end - varname);
!     m->ocm_access = has_public ? ACCESS_ALL
!                             : *varname == '_' ? ACCESS_PRIVATE : ACCESS_READ;
      m->ocm_type = type;
      if (init_expr != NULL)
        m->ocm_init = init_expr;
--- 148,155 ----
        return FAIL;
      ocmember_T *m = ((ocmember_T *)gap->ga_data) + gap->ga_len;
      m->ocm_name = vim_strnsave(varname, varname_end - varname);
!     m->ocm_access = has_public ? VIM_ACCESS_ALL
!                     : *varname == '_' ? VIM_ACCESS_PRIVATE : VIM_ACCESS_READ;
      m->ocm_type = type;
      if (init_expr != NULL)
        m->ocm_init = init_expr;
*** ../vim-9.0.1380/src/fileio.c        2023-01-02 16:54:48.932860868 +0000
--- src/fileio.c        2023-03-05 13:07:53.648526904 +0000
***************
*** 3830,3836 ****
       * original file will be somewhere else so the backup isn't really
       * important. If autoscripting is off the rename may fail.
       */
!     flock = Lock((UBYTE *)from, (long)ACCESS_READ);
  #endif
      mch_remove(to);
  #ifdef AMIGA
--- 3830,3836 ----
       * original file will be somewhere else so the backup isn't really
       * important. If autoscripting is off the rename may fail.
       */
!     flock = Lock((UBYTE *)from, (long)VIM_ACCESS_READ);
  #endif
      mch_remove(to);
  #ifdef AMIGA
*** ../vim-9.0.1380/src/version.c       2023-03-04 20:47:32.308617862 +0000
--- src/version.c       2023-03-05 13:10:42.328688951 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1381,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
226. You sit down at the computer right after dinner and your spouse
     says "See you in the morning."

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230305131302.871051C042C%40moolenaar.net.

Reply via email to