Skip to content

Commit ed93df4

Browse files
h-eastchrisbra
authored andcommitted
patch 9.1.1841: patch 9.1.1840 adds python build dependency
Problem: patch 9.1.1840 adds python build dependency (chdizza) Solution: Update dependencies (Hirohito Higashi) fixes: #18523 related: #18045 closes: #18527 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent e7c765f commit ed93df4

File tree

8 files changed

+157
-156
lines changed

8 files changed

+157
-156
lines changed

runtime/doc/develop.txt

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 9.1. Last change: 2025 Sep 29
1+
*develop.txt* For Vim version 9.1. Last change: 2025 Oct 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -365,28 +365,17 @@ We follow POSIX.1-2001 (SUSv3) for type sizes, which in practice means:
365365

366366
FUNCTION PROTOTYPES *assumptions-prototypes*
367367

368-
Vim currently does not use conventional header files (`.h`) for most internal
369-
function prototypes. Instead, the current architecture uses individual `.pro`
370-
files in the `src/proto/` directory, with one `.pro` file per `.c` file.
368+
Vim does not use conventional header files (`.h`) for most internal function
369+
prototypes. Instead, the current architecture uses individual `.pro` files in
370+
the `src/proto/` directory, with one `.pro` file per `.c` file.
371371

372372
Unlike traditional self-contained header files, these `.pro` files do not
373-
contain API documentation, struct and enum definitions, or other declaration;
373+
contain API documentation, struct and enum definitions, or other declarations;
374374
only function prototypes.
375375

376-
The bundling of these files is not automated. The `src/proto.h` header is
377-
composed of a list of manual `#include` directives, one for each individual
378-
`.pro` file.
379-
380-
Due to this design, integrating a new source file within this architecture
381-
involves creating a corresponding `.pro` file, manually adding a new `#include`
382-
directive to `proto.h` and manually adding this file to both `src/Makefile` and
383-
`src/Make_mvc.mak`.
384-
385-
A `make proto` target exists in `src/Makefile` with the original goal of
386-
automating the process of updating the `.pro` files. However, this target is
387-
unreliable, fails on major platforms (e.g., macOS), and is only part of the
388-
new release workflow. In practice, contributors edit the relevant `.pro` files
389-
by hand when adding, removing, or modifying a function signatures.
376+
The `make proto` target in `src/Makefile` automates updating most of the .pro
377+
files using the Python script proto/gen_prototypes.py, which relies on the
378+
python3-clangd module. Note that a few proto files are hand edited.
390379

391380
This system has been in place since at least v1.24, when Vim's functions were
392381
still written in K&R style.

src/Make_vms.mms

Lines changed: 130 additions & 130 deletions
Large diffs are not rendered by default.

src/Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,7 @@ PROTO_FILES = \
18731873
proto/gc.pro \
18741874
proto/getchar.pro \
18751875
proto/gui_beval.pro \
1876+
proto/gui_gtk_gresources.pro \
18761877
proto/gui_xim.pro \
18771878
proto/hardcopy.pro \
18781879
proto/hashtab.pro \
@@ -2107,6 +2108,11 @@ update-po:
21072108
# - Only the bare minimum of macro definitions is required.
21082109
# - Generates the same .pro file even across different operating systems.
21092110
# (maybe)
2111+
# Note: the following proto files need to be manually updated:
2112+
# proto/gui_haiku.pro
2113+
# proto/if_ole.pro
2114+
# proto/if_perl.pro
2115+
# proto/os_macosx.pro
21102116
#
21112117
# How to set up environment to run `make proto`
21122118
# On Ubuntu 24.04:
@@ -2141,6 +2147,9 @@ GEN_PROTO_ARG = -DPROTO -DFEAT_GUI -DFEAT_WAYLAND -DFEAT_WAYLAND_CLIPBOARD -I.
21412147
proto/%.pro: %.c
21422148
@$(PYTHON) $(GEN_PROTO_CMD) $< $(GEN_PROTO_ARG)
21432149

2150+
proto/gui_gtk_gresources.pro: auto/gui_gtk_gresources.c
2151+
@$(PYTHON) $(GEN_PROTO_CMD) $< $(GEN_PROTO_ARG)
2152+
21442153
notags:
21452154
-rm -f tags
21462155

@@ -3055,13 +3064,13 @@ depend:
30553064
sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
30563065
-for i in $(ALL_LOCAL_SRC); do echo $$i; \
30573066
$(CPP_DEPEND) $$i | \
3058-
sed -e 's+^\([^ ]*\.o\)+objects/\1+' >> tmp_make; done
3067+
sed -e 's+^\([^ ]*\.o\)+objects/\1+' -e 's+proto/[^ ]*\.pro[ ]*++' >> tmp_make; done
30593068
-for i in $(TERM_SRC); do echo $$i; \
30603069
$(CPP_DEPEND) $$i | \
3061-
sed -e 's+^\([^ ]*\.o\)+objects/vterm_\1+' >> tmp_make; done
3070+
sed -e 's+^\([^ ]*\.o\)+objects/vterm_\1+' -e 's+proto/[^ ]*\.pro[ ]*++' >> tmp_make; done
30623071
-for i in $(XDIFF_SRC); do echo $$i; \
30633072
$(CPP_DEPEND) $$i | \
3064-
sed -e 's+^\([^ ]*\.o\)+objects/\1+' -e 's+xdiff/\.\./++g' >> tmp_make; done
3073+
sed -e 's+^\([^ ]*\.o\)+objects/\1+' -e 's+proto/[^ ]*\.pro[ ]*++' -e 's+xdiff/\.\./++g' >> tmp_make; done
30653074
-for i in $(PROTO_FILES); do \
30663075
base=`basename $$i .pro`; \
30673076
echo "$$i: $$base.c" >> tmp_make; done
@@ -4663,6 +4672,7 @@ proto/fuzzy.pro: fuzzy.c
46634672
proto/gc.pro: gc.c
46644673
proto/getchar.pro: getchar.c
46654674
proto/gui_beval.pro: gui_beval.c
4675+
proto/gui_gtk_gresources.pro: auto/gui_gtk_gresources.c
46664676
proto/gui_xim.pro: gui_xim.c
46674677
proto/hardcopy.pro: hardcopy.c
46684678
proto/hashtab.pro: hashtab.c

src/proto/gui_gtk_gresources.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto/gui_gtk_gresources.c */
1+
/* gui_gtk_gresources.c */
22
GResource *gui_gtk_get_resource(void);
33
void gui_gtk_unregister_resource(void);
44
void gui_gtk_register_resource(void);

src/proto/if_ole.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* if_ole.cpp */
1+
/* manually generated from if_ole.cpp */
22
void InitOLE(int* pbDoRestart);
33
void UninitOLE(void);
44
void RegisterMe(int silent);

src/proto/if_perl.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto/if_perl.c */
1+
/* manually generated if_perl.c from if_perl.xs */
22
int perl_enabled(int verbose);
33
void perl_end(void);
44
void msg_split(char_u *s, int attr);

src/proto/os_macosx.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* os_macosx.m */
1+
/* manually generated from os_macosx.m */
22
void process_cfrunloop(void);
33
bool sound_mch_play(const char_u* event, long sound_id, soundcb_T *callback, bool playfile);
44
void sound_mch_stop(long sound_id);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1841,
732734
/**/
733735
1840,
734736
/**/

0 commit comments

Comments
 (0)