Re: Patch 9.0.1175

2023-01-11 Fir de Conversatie Bram Moolenaar


John Marriott wrote:

> On 11-Jan-2023 22:46, Bram Moolenaar wrote:
> > Patch 9.0.1175
> > Problem:The set_ref_in_item() function is too long.
> > Solution:   Use a separate function for more complicated types. (Yegappan
> >  Lakshmanan, closes #11802)
> > Files:  src/eval.c
> >
> >
> >
> After this patch msys64 (clang 15.0.5) gives this error message:
> 
> clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
> -pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
> -DFEAT_CLIPBOARD eval.c -o gobjx86-64/eval.o
> eval.c:5773:42: error: no member named 'v_job' in 'union 
> typval_S::(unnamed at ./structs.h:1548:5)'
>      return set_ref_in_item_job(tv->vval.v_job, copyID,
>      ^
> eval.c:5777:46: error: no member named 'v_channel' in 'union 
> typval_S::(unnamed at ./structs.h:1548:5)'
>      return set_ref_in_item_channel(tv->vval.v_channel, copyID,
>      ^
> 2 errors generated.
> make: *** [Make_cyg_ming.mak:1206: gobjx86-64/eval.o] Error 1
> 
> 
> The attached patch tries to fix it.

I'll include it, thanks.

-- 
While it's true that many normal people whould prefer not to _date_ an
engineer, most normal people harbor an intense desire to _mate_ with them,
thus producing engineerlike children who will have high-paying jobs long
before losing their virginity.
(Scott Adams - The Dilbert principle)

 /// 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/2023091146.6ABEA1C07A0%40moolenaar.net.


Re: Patch 9.0.1175

2023-01-11 Fir de Conversatie John Marriott


On 11-Jan-2023 22:46, Bram Moolenaar wrote:

Patch 9.0.1175
Problem:The set_ref_in_item() function is too long.
Solution:   Use a separate function for more complicated types. (Yegappan
 Lakshmanan, closes #11802)
Files:  src/eval.c




After this patch msys64 (clang 15.0.5) gives this error message:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD eval.c -o gobjx86-64/eval.o
eval.c:5773:42: error: no member named 'v_job' in 'union 
typval_S::(unnamed at ./structs.h:1548:5)'

    return set_ref_in_item_job(tv->vval.v_job, copyID,
    ^
eval.c:5777:46: error: no member named 'v_channel' in 'union 
typval_S::(unnamed at ./structs.h:1548:5)'

    return set_ref_in_item_channel(tv->vval.v_channel, copyID,
    ^
2 errors generated.
make: *** [Make_cyg_ming.mak:1206: gobjx86-64/eval.o] Error 1


The attached patch tries to fix it.

Cheers
John

--
--
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/029b4220-a6b3-5dcf-aa38-fec5b8709308%40internode.on.net.
--- eval.c.orig 2023-01-12 05:46:53.096761500 +1100
+++ eval.c  2023-01-12 06:01:15.55792 +1100
@@ -5580,6 +5580,7 @@
 return abort;
 }
 
+#ifdef FEAT_JOB_CHANNEL
 /*
  * Mark the job "pt" with "copyID".
  * Also see set_ref_in_item().
@@ -5591,7 +5592,6 @@
 ht_stack_T **ht_stack,
 list_stack_T   **list_stack)
 {
-#ifdef FEAT_JOB_CHANNEL
 typval_Tdtv;
 
 if (job == NULL || job->jv_copyID == copyID)
@@ -5610,7 +5610,6 @@
dtv.vval.v_partial = job->jv_exit_cb.cb_partial;
set_ref_in_item(, copyID, ht_stack, list_stack);
 }
-#endif
 
 return FALSE;
 }
@@ -5626,7 +5625,6 @@
 ht_stack_T **ht_stack,
 list_stack_T   **list_stack)
 {
-#ifdef FEAT_JOB_CHANNEL
 typval_Tdtv;
 
 if (ch == NULL || ch->ch_copyID == copyID)
@@ -5665,10 +5663,10 @@
dtv.vval.v_partial = ch->ch_close_cb.cb_partial;
set_ref_in_item(, copyID, ht_stack, list_stack);
 }
-#endif
 
 return FALSE;
 }
+#endif
 
 /*
  * Mark the class "cl" with "copyID".
@@ -5770,12 +5768,20 @@
ht_stack, list_stack);
 
case VAR_JOB:
+#ifdef FEAT_JOB_CHANNEL
return set_ref_in_item_job(tv->vval.v_job, copyID,
 ht_stack, list_stack);
+#else
+   break;
+#endif
 
case VAR_CHANNEL:
+#ifdef FEAT_JOB_CHANNEL
return set_ref_in_item_channel(tv->vval.v_channel, copyID,
 ht_stack, list_stack);
+#else
+   break;
+#endif
 
case VAR_CLASS:
return set_ref_in_item_class(tv->vval.v_class, copyID,