Don't try to reinvent memcpy().
This commit is contained in:
@@ -66,13 +66,17 @@ static LJ_AINLINE char *lj_buf_more(SBuf *sb, MSize sz)
|
||||
}
|
||||
|
||||
/* Low-level buffer put operations */
|
||||
LJ_FUNC char *lj_buf_wmem(char *p, const void *q, MSize len);
|
||||
LJ_FUNC SBuf * lj_buf_putmem(SBuf *sb, const void *q, MSize len);
|
||||
LJ_FUNC SBuf *lj_buf_putmem(SBuf *sb, const void *q, MSize len);
|
||||
#if LJ_HASJIT
|
||||
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putchar(SBuf *sb, int c);
|
||||
#endif
|
||||
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putstr(SBuf *sb, GCstr *s);
|
||||
|
||||
static LJ_AINLINE char *lj_buf_wmem(char *p, const void *q, MSize len)
|
||||
{
|
||||
return (char *)memcpy(p, q, len) + len;
|
||||
}
|
||||
|
||||
static LJ_AINLINE void lj_buf_putb(SBuf *sb, int c)
|
||||
{
|
||||
char *p = lj_buf_more(sb, 1);
|
||||
|
||||
Reference in New Issue
Block a user