On 15-Jan-2025 03:45, Christian Brabandt wrote:
patch 9.1.1016: Not possible to convert string2blob and blob2string
Commit:https://github.com/vim/vim/commit/1aefe1de0b20fe4966863e07efa14b6aa87323ee
Author: Yegappan Lakshmanan<yegap...@yahoo.com>
Date: Tue Jan 14 17:29:42 2025 +0100
patch 9.1.1016: Not possible to convert string2blob and blob2string
Problem: Not possible to convert string2blob and blob2string
Solution: add support for the blob2str() and str2blob() functions
closes: #16373
Signed-off-by: Yegappan Lakshmanan<yegap...@yahoo.com>
Signed-off-by: Christian Brabandt<c...@256bit.org>
After this patch, clang (v19.1.16) on Win11 Pro throws this linker error
if FEAT_SPELL is not defined (same for non-GUI build):
<snip>
clang -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00
-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 -Wl,-nxcompat,-dynamicbase -municode -s -mwindows -o
gvim.exe gobjx86-64/alloc.o gobjx86-64/arabic.o gobjx86-64/arglist.o
gobjx86-64/autocmd.o gobjx86-64/beval.o gobjx86-64/blob.o
gobjx86-64/blowfish.o gobjx86-64/buffer.o gobjx86-64/bufwrite.o
gobjx86-64/change.o gobjx86-64/charset.o gobjx86-64/cindent.o
gobjx86-64/clientserver.o gobjx86-64/clipboard.o gobjx86-64/cmdexpand.o
gobjx86-64/cmdhist.o gobjx86-64/crypt.o gobjx86-64/crypt_zip.o
gobjx86-64/debugger.o gobjx86-64/dict.o gobjx86-64/diff.o
gobjx86-64/digraph.o gobjx86-64/drawline.o gobjx86-64/drawscreen.o
gobjx86-64/edit.o gobjx86-64/eval.o gobjx86-64/evalbuffer.o
gobjx86-64/evalfunc.o gobjx86-64/evalvars.o gobjx86-64/evalwindow.o
gobjx86-64/ex_cmds.o gobjx86-64/ex_cmds2.o gobjx86-64/ex_docmd.o
gobjx86-64/ex_eval.o gobjx86-64/ex_getln.o gobjx86-64/fileio.o
gobjx86-64/filepath.o gobjx86-64/findfile.o gobjx86-64/float.o
gobjx86-64/fold.o gobjx86-64/getchar.o gobjx86-64/gc.o
gobjx86-64/gui_xim.o gobjx86-64/hardcopy.o gobjx86-64/hashtab.o
gobjx86-64/help.o gobjx86-64/highlight.o gobjx86-64/if_cscope.o
gobjx86-64/indent.o gobjx86-64/insexpand.o gobjx86-64/json.o
gobjx86-64/linematch.o gobjx86-64/list.o gobjx86-64/locale.o
gobjx86-64/logfile.o gobjx86-64/main.o gobjx86-64/map.o
gobjx86-64/mark.o gobjx86-64/match.o gobjx86-64/memfile.o
gobjx86-64/memline.o gobjx86-64/menu.o gobjx86-64/message.o
gobjx86-64/misc1.o gobjx86-64/misc2.o gobjx86-64/mouse.o
gobjx86-64/move.o gobjx86-64/mbyte.o gobjx86-64/normal.o
gobjx86-64/ops.o gobjx86-64/option.o gobjx86-64/optionstr.o
gobjx86-64/os_mswin.o gobjx86-64/os_win32.o gobjx86-64/pathdef.o
gobjx86-64/popupmenu.o gobjx86-64/popupwin.o gobjx86-64/profiler.o
gobjx86-64/quickfix.o gobjx86-64/regexp.o gobjx86-64/register.o
gobjx86-64/scriptfile.o gobjx86-64/screen.o gobjx86-64/search.o
gobjx86-64/session.o gobjx86-64/sha256.o gobjx86-64/sign.o
gobjx86-64/spell.o gobjx86-64/spellfile.o gobjx86-64/spellsuggest.o
gobjx86-64/strings.o gobjx86-64/syntax.o gobjx86-64/tag.o
gobjx86-64/term.o gobjx86-64/testing.o gobjx86-64/textformat.o
gobjx86-64/textobject.o gobjx86-64/textprop.o gobjx86-64/time.o
gobjx86-64/typval.o gobjx86-64/ui.o gobjx86-64/undo.o
gobjx86-64/usercmd.o gobjx86-64/userfunc.o gobjx86-64/version.o
gobjx86-64/vim9class.o gobjx86-64/vim9cmds.o gobjx86-64/vim9compile.o
gobjx86-64/vim9execute.o gobjx86-64/vim9expr.o gobjx86-64/vim9instr.o
gobjx86-64/vim9script.o gobjx86-64/vim9type.o gobjx86-64/viminfo.o
gobjx86-64/winclip.o gobjx86-64/window.o gobjx86-64/os_w32exe.o
gobjx86-64/vimres.o gobjx86-64/xdiffi.o gobjx86-64/xemit.o
gobjx86-64/xprepare.o gobjx86-64/xutils.o gobjx86-64/xhistogram.o
gobjx86-64/xpatience.o gobjx86-64/gui.o gobjx86-64/gui_w32.o
gobjx86-64/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32
-lcomctl32 -lnetapi32 -lversion -lgcc_eh -Wl,-Bstatic -lwinpthread
-Wl,-Bdynamic -lole32 -luuid
E:/msys64/ucrt64/bin/ld: gobjx86-64/strings.o:strings.c:(.text+0x1dd3):
undefined reference to `utf_valid_string'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [Make_cyg_ming.mak:1170: gvim.exe] Error 1
</snip>
I'm not 100% certain of the correct fix, but the attached diff at least
means it will compile.😉
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 visit
https://groups.google.com/d/msgid/vim_dev/191a6974-cd6b-4beb-ab5c-27910420e4d9%40internode.on.net.
--- strings.c.20250115-074230 2025-01-15 07:42:30 +0000
+++ strings.c 2025-01-15 08:11:44 +0000
@@ -1286,6 +1286,7 @@
}
}
+#if defined(FEAT_GUI_GTK) || defined(FEAT_SPELL) || defined(PROTO)
if (STRCMP(p_enc, "utf-8") == 0 || STRCMP(p_enc, "utf8") == 0)
{
if (!utf_valid_string(p, NULL))
@@ -1295,6 +1296,7 @@
return;
}
}
+#endif
rettv->vval.v_string = p;
}