Add common helper for pointer to string formatting.

This commit is contained in:
Mike Pall
2013-08-31 19:38:20 +02:00
parent 517500ba48
commit 19c2dd17db
3 changed files with 9 additions and 4 deletions

View File

@@ -714,8 +714,7 @@ again:
lj_strfmt_putfchar(sb, sf, lj_lib_checkint(L, arg));
break;
case STRFMT_PTR: /* No formatting. */
setsbufP(sb, lj_strfmt_wptr(lj_buf_more(sb, STRFMT_MAXBUF_PTR),
lj_obj_ptr(L->base+arg-1)));
lj_strfmt_putptr(sb, lj_obj_ptr(L->base+arg-1));
break;
default:
lua_assert(0);