misc: Make jit_note and related functions take a const argument - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_note.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014年10月26日 22:21:42 +0100
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2014年11月01日 18:52:27 -0200
commit2229200c44d0e6ffc9b6509db57c2378459ee351 (patch)
treef1f99104bb8f9f6ce659fcc53c13bc0893d6fcde /lib/jit_note.c
parent44519452d9b7f7bc46e2fb5154df438ee316f96c (diff)
downloadlightning-2229200c44d0e6ffc9b6509db57c2378459ee351.tar.gz
misc: Make jit_note and related functions take a const argument
Make jit_memcpy, jit_memmove, jit_data take const pointers to allow jit_note to be used with a const string (e.g. a string literal, __FILE__ or __func__). This is needed for GNU Smalltalk to silence compiler warnings. Sadly "const jit_pointer_t" is not the same as "typedef const void *" so I introduced a new typedef for a const jit pointer. The other option would be to replace jit_pointer_t with void*.
Diffstat (limited to 'lib/jit_note.c')
-rw-r--r--lib/jit_note.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jit_note.c b/lib/jit_note.c
index f3d35fa..b8a18ce 100644
--- a/lib/jit_note.c
+++ b/lib/jit_note.c
@@ -70,7 +70,7 @@ _jit_name(jit_state_t *_jit, char *name)
}
jit_node_t *
-_jit_note(jit_state_t *_jit, char *name, int line)
+_jit_note(jit_state_t *_jit, const char *name, int line)
{
jit_node_t *node;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月11日 13:15:25 +0000

AltStyle によって変換されたページ (->オリジナル) /