1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-21 19:20:21 +02:00

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*.
This commit is contained in:
Holger Hans Peter Freyther 2014-10-26 22:21:42 +01:00 committed by pcpa
parent 44519452d9
commit 2229200c44
5 changed files with 12 additions and 11 deletions

View file

@ -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;