Mercurial > vim
view src/proto/scriptfile.pro @ 33583:123acdc8e64c v9.0.2036
patch 9.0.2036: if_python: rework python3.12 build dependency
Commit: https://github.com/vim/vim/commit/396058acd0cc66e5071d052e03d2067b134952af
Author: Yee Cheng Chin <ychin.git@gmail.com>
Date: Tue Oct 17 10:38:11 2023 +0200
patch 9.0.2036: if_python: rework python3.12 build dependency
Problem: if_python: rework python3.12 build dependency
(after 9.0.1996)
Solution: use PyTuple_Size instead of inlining the Py_SIZE
into the Vim code base
Use a simpler fix for Python 3.12 build issues
Python 3.12 introduced link dependencies to their `Py_SIZE()` inline
function, which #13290 fixed by copying the inline function to Vim's
Python binding code. This works but it's fragile, as a future update may
change the implementation of `Py_SIZE` and there is no way for us to
know.
The reason we need `Py_SIZE` to begin with is that we use
`PyTuple_GET_SIZE()` which calls that. Just fix it by mapping that to
(confusingly similarly named) `PyTuple_Size()`, which we already do in
the stable ABI implementation. There's a minor performance cost in that
it's not inlined and it does error checking but that's fine as we only
call this function rarely (in an error handler).
related: #13290
closes: #13359
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 17 Oct 2023 10:45:04 +0200 |
parents | 61389a392fe8 |
children | 4cc31827e1db |
line wrap: on
line source
/* scriptfile.c */ void estack_init(void); estack_T *estack_push(etype_T type, char_u *name, long lnum); estack_T *estack_push_ufunc(ufunc_T *ufunc, long lnum); int estack_top_is_ufunc(ufunc_T *ufunc, long lnum); estack_T *estack_pop(void); char_u *estack_sfile(estack_arg_T which); void ex_runtime(exarg_T *eap); void set_context_in_runtime_cmd(expand_T *xp, char_u *arg); int find_script_by_name(char_u *name); int get_new_scriptitem_for_fname(int *error, char_u *fname); int do_in_path(char_u *path, char *prefix, char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie); int do_in_runtimepath(char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie); int source_runtime(char_u *name, int flags); int source_in_path(char_u *path, char_u *name, int flags, int *ret_sid); int find_script_in_rtp(char_u *name); void add_pack_start_dirs(void); void load_start_packages(void); void ex_packloadall(exarg_T *eap); void ex_packadd(exarg_T *eap); void remove_duplicates(garray_T *gap); int ExpandRTDir(char_u *pat, int flags, int *num_file, char_u ***file, char *dirnames[]); int expand_runtime_cmd(char_u *pat, int *numMatches, char_u ***matches); int ExpandPackAddDir(char_u *pat, int *num_file, char_u ***file); void ex_source(exarg_T *eap); void ex_options(exarg_T *eap); linenr_T *source_breakpoint(void *cookie); int *source_dbg_tick(void *cookie); int source_level(void *cookie); char_u *source_nextline(void *cookie); int do_source(char_u *fname, int check_other, int is_vimrc, int *ret_sid); void ex_scriptnames(exarg_T *eap); void scriptnames_slash_adjust(void); char_u *get_scriptname(scid_T id); void free_scriptnames(void); void free_autoload_scriptnames(void); linenr_T get_sourced_lnum(char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie); void f_getscriptinfo(typval_T *argvars, typval_T *rettv); char_u *getsourceline(int c, void *cookie, int indent, getline_opt_T options); int sourcing_a_script(exarg_T *eap); void ex_scriptencoding(exarg_T *eap); void ex_scriptversion(exarg_T *eap); void ex_finish(exarg_T *eap); void do_finish(exarg_T *eap, int reanimate); int source_finished(char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie); char_u *get_autoload_prefix(scriptitem_T *si); char_u *may_prefix_autoload(char_u *name); char_u *autoload_name(char_u *name); int script_autoload(char_u *name, int reload); /* vim: set ft=c : */